|
thanks
, but i still get not the correct events from Netscape, for every Button click a
seperate one with the information wich button was clicked
:-(((
-----Urspr�ngliche
Nachricht----- Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag von Doug
Melvin Gesendet: Freitag, 6. April 2001 01:51 An:
[EMAIL PROTECTED] Betreff: Re: [Dynapi-Help] Sorry
....
see
response inline:
function OBar (id,x,y,w,h) { this.DynLayer =
DynLayer; this.DynLayer(); this.items =
[]; this.buttonListener = new
EventListener(this);
this.buttonListener.
(e) { var o = e.getSource(); alert
(o); } this.addEventListener(OBar.Listener); <-- this line should
read this.addEventListener()this.buttonListener;
as this.buttonListener is the name of the
EventListener you have
created. }
OBar.prototype = new DynLayer
(); OBar.prototype.getSubClass = function () { return OBar }
OBar.Listener = new
EventListener(this); <-- this line hsould not be here,
as you are not doing anything with .Listener
OBar.prototype.add =
function(text,url){ var nb = this.addChild(new
Button()); nb.setText
(text); nb.addEventListener(this.buttonListener); nb.setSize(this.w,20) nb.moveTo
(0,100); this.items[this.items.length] =
nb var nb2 = this.addChild(new
Button()); nb2.setText
(text); nb2.addEventListener(this.buttonListener); nb2.setSize(this.w,20) nb2.moveTo
(0,10); this.items[this.items.length] =
nb2 };
thanks for the
help
Freddi Gaisler
Germany
|