Just an idea: try to extend from qx.core.Object
Sebastian Werner
Am 17.09.2008 um 10:31 schrieb Jean-Baptiste BRIAUD - Novlog <[EMAIL PROTECTED]
>:
On 17 Sep 2008, at 04:14, Derrell Lipman wrote:
On Tue, Sep 16, 2008 at 5:30 PM, Jean-Baptiste BRIAUD - Novlog <[EMAIL PROTECTED]
> wrote:
I defined a singleton class.
How did you define your singleton? The getInstance() wrapper is
produced when your class has a type:"singleton" entry.
Here is the code :
qx.Class.define("n.WindowFactory", {
type : "singleton",
members : {
getNewWindow : function() {
this.debug("WindowFactory.getNewWindow()");
}
}
});
I noticed that it is working to get the singleton this way :
var wf = n.WindowFactory.getInstance;
but it doesn't work to get it this way :
var wf = n.WindowFactory.getInstance();
Is wf some value other than undefined? If so, what value is it?
You're not adding a static called getInstance are you? What does
this display:
this.warn("getInstance=" + getInstance);
I didn't add myself the getInstance mecanism :-)
I didn't noticed but in fact, it doesn't work with getInstance !
wf is undefined.
Here are the lines I used to get the singleton :
this.debug("Execute command: newFinderCommand " + e);
var wf = n.WindowFactory.getInstance; <-- it pass when I
use getInstance and it fail when I use getInstance()
this.debug("OK, got the Singleton");
wf.getNewWindow(); <-- its failling here wf is undefined
this.debug("Ok, called the getNewWindow()");
So, finally, it's not working either way (I was tired yesterday
night and a line was commented, leacing the impression it worked)
using getInstance() it fail with getInstance is not a function
and using getInstance, it pass (why ?) but then wf is undefined ...
Is 'n' a top-level namespace or a variable name? If a variable
name, what is n.WindowFactory? A class reference or an instance of
something?
just namespace like Java package
It sounds a lot like you don't have a type:"singleton" entry in
your class map.
Could be a very simple syntax issue as I'm new to qooXdoo but I
added it.
Syntax question : what is the rules for the spaces (I put the quote
only to make spaces visible) in 'members:', 'members : ' or
'members: ' ?
If the above doesn't help you solve the problem, please attach a
small but complete failing singleton class that we can look at and
comment on.
Cheers,
Derrell
---
---
-------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
---
----------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel