Re: Window widget events not firing

Mark Anderson <[email protected]>
Newsgroups gmane.comp.windows.devel.netwindows
Message-ID <[email protected]>

Dee Gould wrote:

> I am utilizing the window widget to load an html page which includes not 
> only static, but also dynamic content.  The current issue I'm having is 
> I use __sig__.connectOnceByName to connect the events on the buttons, 
> but they do not seem to be firing.
> Here's how we have it loading:
> 
> NW_WIDGET_window_create_load_append(500, 500, 100, 100, "", "", url );
> ( url being our html page )
> 
> in the onload event of the page we load we create a 'new' of the class 
> that is utilized for connecting the button events:
> onload='javascript:(new CustomerSearch()).constructor();'
> 
> and in the constructor method we have:
> __sig__.connectOnceByName(document.getElementById("cancelButton"), 
> "onclick", this, "cancelClicked");    

whose document has the cancelButton?
if you are running this in the newly created window, but the document
with the cancelButton is the other window, this clearly won't work.

you'll need to say something like opener.document.getElementById or
otherwise get a handle to original window.

the other thing to check for in the NW source code is anywhere there
is a test like obj.constructor == Array or obj.constructor == "".constructor.
Those tests don't work typically, if obj is from a different window
from the window where the function code is defined.

-mda



_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.