On Sat, Jan 16, 2010 at 15:05, Mikael Hakman <mhak...@dkab.net> wrote:
> Hello,
>
> The following code gives "Please initialize
> 'qx.ui.table.columnmodel.Resize'
> objects using the new keyword!" error:
>
> this.table = new qx.ui.table.Table (model ,{tableColumnModel :
> qx.ui.table.columnmodel.Resize});
>
> However, the following works ok:
>
> this.table = new qx.ui.table.Table (model ,{tableColumnModel :
> function(obj)
> {return (new qx.ui.table.columnmodel.Resize(obj));}});
>
> Could some knowledgeable person explain why?
>
Yes. The elements of the "custom" parameter (the second parameter to the
constructor) are functions which are called by various helper classes within
the Table code. The tableColumnModel member of the "custom" map is expected
to be a function which, when it is called, will be passed the table object,
and must return a column model instance. Similarly for the other members of
"custom". This is described in the documentation for the Table constructor,
which states:
@param custom {Map ? null}
A map provided to override the various supplemental classes allocated
within this constructor. Each property must be a function which
returns an object instance, as indicated by the defaults listed
...
Cheers,
Derrell
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel