Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
Error: 'ctr' is undefined javascript error
posted

Hi,

 Does anybody know about this issue? I have some nested Websplitters and am trying to set the size of them via the set_size() method and ran into this error.  I debugged and it seems to lead to the following method definition:

set_size:function(value)

{

/// <summary>Sets size of pane in pixels. That has effect only for expanded pane and only after first paint of control.</summary>

/// <param name="value" type="Number">Size of pane in pixels.</param>

/// <returns type="Boolean">Value of true means that size of pane was set. Value of false means failure,- size was not set due to collapsed state or before first paint.</returns>

var ctl = this._owner;

var pane = ctl._validPane(this, 1, 1);

if(!pane)

pane = ctr._validPane(this, -1, 1); <---- This line is throwing the error

if(!pane || this.get_collapsed() || !ctl._once)

return false;

var both = this._size + pane._size;

if(value > both) value = both;

value = this._validSize(value);var val2 = pane._validSize(both - value);

value = both - val2;

ctl._setPaneSize(
this, value);

ctl._setPaneSize(pane, val2);

return true;

},

You can clearly see that a variable ctr is being accessed, yet when you to a search, there's no definition for this object.  Is this a bug?  Everywhere else it uses the ctl object.  However, oddly enough, this splitter contains 3 panels, if I run the following javascript

splitter._panes[0].set_size(2000);

splitter._panes[1].set_size(2000);

Everything is kosher, however, if I run the following:

splitter._panes[2].set_size(2000);

That's where this error occurs.  I'm using the new 8.3 build for .Net 3.5

 Thanks

Parents Reply Children