Hi Alexader, it works, but i have to send parameters to the callbackfunktion like: this.openKmpWin(sobj, dobj) regards Mustafa Sak
________________________________ Von: Alexander Back [mailto:alexander.b...@1und1.de] Gesendet: Do 08.01.2009 08:45 An: qooxdoo Development Betreff: Re: [qooxdoo-devel] Invalid callback function Hi Mustafa, Mustafa Sak wrote: > Greatings, > > i'm getting this console message: > [Exception... "'Failed to add event listener for type 'execute' to the target > 'qx.ui.form.Button[2m]': Invalid callback function: Expected value to be > typeof function but found undefined!' when calling method: > [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c > (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no] Easy one. Just remove the "()" to hand over the function itself (not the result of the function). --snip-- // the line win.form.bntLoginSubmit.addListener("execute", this.openKmpWin(),this); // has to be win.form.bntLoginSubmit.addListener("execute", this.openKmpWin, this); --snip-- since the "addListener" method expects a function as second parameter. In the line above you do *call* the function directly and end up with the result of the function which is "undefined" because your function does not have a return value. cheers, Alex > my source looks like this: > > makeLoginWin : function() > { > var win = new qx.ui.window.Window("Login", > "icon/16/apps/office-calendar.png"); > this.root.add(win); > win.form = new qx.ui.container.Composite(new qx.ui.layout.Grid(3,2)); > win.form.bntLoginSubmit = new qx.ui.form.Button("Login"); > win.form.bntLoginSubmit.addListener("execute", this.openKmpWin(),this); > win.form.add(win.form.bntLoginSubmit, {row: 2, column: 1}); > win.add(win.form); > return win; > }, > > openKmpWin : function() > { > alert("DEBUG"); > > }, > > I can't figure it out. > > regards > Mustafa Sak ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
<<winmail.dat>>
------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB
_______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel