Re: Window widget events not firing
Alex Russell <[email protected]>
| Newsgroups | gmane.comp.windows.devel.netwindows |
|---|---|
| Organization | netWindows.org |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 22 July 2003 4:09 pm, Mark Anderson wrote:
> > 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");
>
> Just for the sake of debugging, how about this:
>
> var cancelb = document.getElementById("cancelButton");
> if (!cancelb) throw Error("no cancelButton!");
> if (!this.cancelClicked) throw Error("no cancelClicked!");
> var this_ = this;
> NW_addEventListener(cancelb, 'click', function() {alert('calling
> cancelClicked'); this_.cancelClicked();});
>
> where NW_addEventListener is in latest cvs.
>
> ---
> the defensive programming above is just to sanity check.
> the use of a different event registration is to determine if this
> is a sigslot issue (i'm guessing you are using sigslot_core2 not
> sigslot classic?)
It wont' matter, they're making a bad assumption about framed-ness.
There are better ways to do this. Mail pending = )
- --
Alex Russell
[email protected]
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/HawEoV0dQ6uSmkYRAq+MAJ970C6uwBbAqxRUFCL2V70UufTQUgCgvJ9E
/PPmsqig/bEf9bnefp/8Mj8=
=auYU
-----END PGP SIGNATURE-----
_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org