views:

44

answers:

1

hello im trying to develop an standalone application with qooxdoo. i want to load each part of GUI with PartLoader. i just want to load big group boxes when the user select the related menu item from the menu. but when i run the code (execute the part loading related function) i got the error "arguments.callee.base.call is not a function". im using Firefox 3.6 on windows xp.

this is the my part loading code in Application.js:

qx.io.PartLoader.require(["part1"], function()
{
        if (!this.__groupbox1)
        {
                this.__groupbox1 = new appname.Classname();
                container.add(this.__groupbox1, {left:20, top:40});

        }


}, this);

this is the Class code to be loaded:

qx.Class.define("appname.Classname",
{
  extend : new qx.ui.groupbox.GroupBox,

  construct : function()
  {

        this.base(arguments);
        this._addContent();



  },
  members:
  {
   _addContent : function()
   {
       some_ui_parts;
       this.add(some_ui.parts);
       some_more_ui_parts;
       this.add(some_more_ui_parts);
    }
   }
});

and this is the part of the config.jason related to PartLoader:

"jobs":
{
"common":
{
  "packages" :
  {
    "parts"  :
    {
      "boot"     :
      {
        "include" : [ "${QXTHEME}", "appname.Application" ]
      },
      "part1" :
      {
        "include" : [ "appname.Classname" ]
      }
    }
  }
}
}

note: i just replaced real appname & Classname with appname.Classname short.

i searched for this error but i could not find anything related.

A: 

You have to change the lines

qx.Class.define("appname.Classname",
{
  extend : new qx.ui.groupbox.GroupBox,

to

qx.Class.define("appname.Classname",
{
  extend : qx.ui.groupbox.GroupBox,

When you define a new class and extend it the "new" operator is not necessary. More infos about can be found at the Classes documentation at the qooxdoo wiki.

Alexander Steitz