Thank you all for your suggestions.

Again, my mistake.
I need to use parent.logout().

Since I am invoking it inside my html page, like Atom_1.html in Demo
Browser.
Since the html pages in Demo browser runs in IFrame, they need to refer the
parent objects using prefix parent.

My application design is exactly like Demo Browser design.

Derell, I like your design too!. 

Thank you.
Kanugula.

My application design is like Demo Browser design.   

Derrell Lipman wrote:
> 
> On Fri, May 16, 2008 at 5:33 PM, kanugula <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> I am having problem invoking javascript function in Qooxdoo Static
>> member.
>> I get the error logout() is not a function.
>>
>> qx.Class.define("dialog.StatusDialog",
>> {
>>        statics :
>>        {
>>             show : function(exc, isSuccess)
>>            {
>>               if (exc["class"] = "RemoteSessionTimeout") {
>>                     qx.client.Timer.once(
>>                  function()
>>                  {
>>                      this.logout(); //doesn't work
> 
> 
> Well that will certainly not work since a static method, by definition, is
> not associated with an object, so there's no 'this'.
> 
>>
>>                                logout(); //this is also not working
> 
> 
> I'm a little surprised that that doesn't work, but you can make it
> explicit.  Instead of calling logout(), call window.logout().  Then...
> 
>    <script type='text/javascript'>
>>        function logout(){
>>          alert("called");
>>        }
> 
> 
> Replace that with:
> 
>   window.logout = function()
>   {
>     alert("called");
>   } ;
> 
> See if that works for you.
> 
> Do you really need global functions?  Can't logout be in a qooxdoo class?
> If there's no reason that you can't have it in a qooxdoo class, you can
> prevent muddying the global address space.  You could do something like
> this:
> 
> qx.Class.define("myPseudoGlobalSpace",
> {
>   statics:
>   {
>     logout : function()
>     {
>       alert("called");
>     }
>   }
> });
> 
> and then in dialog.statusDialog.show(), you can call
> myPseudoGlobalSpace.logout()
> 
> Derrell
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft 
> Defy all challenges. Microsoft(R) Visual Studio 2008. 
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Accessing-javascript-function-in-Qooxdoo-static-member-tp17284645p17286883.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to