Sorry I think you misunderstood me, let me reclarrify for you:

there is no default for the extend value so if you don't specify the 
"extend" keyword in your class definition you are not extending anything.

However all singletons *must* extend from Object (or possibly another 
class extending from Object).


Jean-Baptiste BRIAUD - Novlog wrote:
> On 17 Sep 2008, at 13:28, Matthew Gregory wrote:
> 
>> Jean-Baptiste BRIAUD - Novlog wrote:
>>
>>> Can I conclude that It is mandatory to extend something, it not
>>> inheriting from Object by default ?
>> AFAIK you don't need to extend from anything, static classes for  
>> example
> I don't think Singleton is a static class
>> cannot extend from anything in 0.8. You would extend from Object  
>> most of
>> the time though as this implements this.warn, this.error and other
>> useful stuff!
> Yes, very usefull :-) but that was not my question. Let me clarify my  
> question :
> 
> Singleton did not work for me without explicitly inherit my class from  
> Object. This let me though that there was no default inheritance from  
> Object but this is in contradiction with documentation examples where  
> lots of classes do not have a super class defined.
> 
> So the question : what is the meaning (semantic) of a class without  
> extend (syntax) ?
> Does it or not extend by default from Object ?
> If yes, why the singleton is not working ?
> if no, we should correct doc examples that defines classes without  
> extend element and we should explain that the extend (at least extend  
> from Object) is mandatory when defining a class.
> 
>>> I also try now to use getInstance; it pass but then it fails on the
>>> getNewWindow : not a function.
>> Are you calling getInstance?
>>
>> use this:
>> var wf = n.WindowFactory.getInstance();
>>
> That's what I did and it worked when my singleton class inherit from  
> Object but I'd like to understand why it didn't worked when the extend  
> element is ommited.
> 
>> NOT this:
>> var wf = n.WindowFactory.getInstance;
>>
> 
> OK.
> 
>> HTH
>> Matt
>>
>>
>> -------------------------------------------------------------------------
>> 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=/


-------------------------------------------------------------------------
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

Reply via email to