Hi Fabian,

I'm sorry but the initializer method was already called behind the this.base(arguments,...) call but it did not work. Here is the code of the constructor:

 construct : function(vCaption, vIcon, vWindowManager)
 {
this.base(arguments, vCaption, (vIcon ? vIcon : 'icon/16/actions/documentinfo.png'), vWindowManager);
   this.initMessageIcons({
       info    : "icon/16/actions/documentinfo.png",
       error   : "icon/16/actions/stop.png",
       warning : "icon/16/actions/status_unknown.png",
       ok      : 'icon/16/status/ok.png'
     }
   );

The error is:

this.initMessageIcons is not a function
http://nra/nra/app-source/class/qx/visionet/ui/dialog/MessageDialog.js
Line 52

Anyway, if I define the property as follows:

   messageIcons :
   {
     check : "Object",
     init  : {
       info    : "icon/16/actions/documentinfo.png",
       error   : "icon/16/actions/stop.png",
       warning : "icon/16/actions/status_unknown.png",
       ok      : 'icon/16/status/ok.png'
     }
   }

The init value is declared properly. What is the difference between having the initial value in the init property and assigned by the init method call in the constructor?



Fabian Jakobs schrieb:
Dietrich Streifert schrieb:
Hello List,

I have a widget with a property called messageIcons which is defined as follows:

    messageIcons :
    {
      check : "Object"
    }

As documented in:

http://qooxdoo.org/documentation/0.7/defining_properties?s=properties

I'm using in the constructor the initializer method of the property to set an initial value:

    this.initMessageIcons({
      info    : "icon/16/actions/documentinfo.png",
      error   : "icon/16/actions/stop.png",
      warning : "icon/16/actions/status_unknown.png",
      ok      : 'icon/16/status/ok.png'
    });

At instanciation time of the widget the following error message is displayed:

this.initMessageIcons is not a function
http://nra/nra/app-source/class/qx/visionet/ui/dialog/MessageDialog.js
Line 52

What is wrong with my code?

Any help is welcome.
The property methods are only available after the constructor of qx.core.Object is called. If you place your init after the "this.base" call everything should work.

Best Fabian


--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to