Hi Luc,

the problem is in your base call.

--snip--
// wrong
this.base(this.caption);

// right
this.base(arguments, this.caption);
--snip--

You always have to provide the "arguments" if you want to call the super class 
constructor.

Regards,
  Alex

On Thursday March 10 2011 15:31:34 Luc Saffre wrote:
> Beginner's question: Where's the bug? I'm giving up for today, after
> several hours of hunting. Now I post the relevant code snippets in the
> hope that some veteran finds my mistake at a glance...
> 
> qx.Class.define("lino.TableWindow",
> {
>   extend : qx.ui.window.Window,
> 
>   construct : function(app) {
>       console.log('lino.TableWindow.construct()',this,app);
>       this.base(this.caption);
>       console.log('lino.TableWindow.construct.base ok');
>       this.__app = app;
>   ...
> }
> 
> qx.Class.define("lino.CountriesCitiesTable", {
>   extend : lino.TableWindow,
>   members : {
>     caption : 'Städte',
>   ...
> }
> 
> qx.Class.define("lino.Application", {
>   extend : qx.application.Standalone,
> 
>   members : {
>     showWindow : function(cls) {
>       console.log('lino.Application.showWindow',cls);
>       var win = new cls(this);
>       win.open();
>       this.getRoot().add(win, {left: 50, top: 10});
>     },
>     setupMainMenu : function() {
>       ...
>       var b = new qx.ui.menu.Button("Cities");  m.add(b);
>       b.addListener('execute',function() {
>         this.showWindow(lino.CountriesCitiesTable)},this);
>   ...
> }
> 
> The console output in Google Chrome is::
> 
>  lino.Application.showWindow [Class lino.CountriesCitiesTable]
>  lino.TableWindow.construct() bT bT
>  Uncaught TypeError: Cannot read property 'base' of undefined
> 
> when I expand the two "bT", their basenames are 'CountriesCitiesTable'
> and 'Application', as expected.
> 
> Here is also the line of code which throws the error in Object.js:127::
> 
>   if (!qx.Bootstrap.isFunction(args.callee.base)) {
> 
> Thanks for any feedback.
> Luc

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to