> Eric Bennett wrote: > > He probably means being able to open multiple instances of a > > window or being able to subclass window or control behavior. > > I'm afraid I still don't get the exact point (I'm tired, sorry :-). >
i dont know what i meant either (i was tired too). > > Right now the only connection a control has to the rest of the > > program is through the control name. This means that to open two > > identical windows where the controls on each window refer to the > > right window's values you have to use app-unique names for controls > > and then dynamically define subs with lexical references to those > > values. > > this is more clear. the New Event Model I'm trying to build will > pass a reference to the object that fired the event as its first > parameter, so this issue will be solved. > that will be nice, but there is still the issue of name space. having to name each control in some sort of global space...ie. $MW->Button(Name => 'MyButton1'); gets hard to keep track when you want to break your program into objects or even if it gets really big. i dont know how else you could do it though. and seeming as how the topic was event handlers, i think it would be cool if i could say: my $btn = $MainW->Button(); $btn->add_handler('Click', \&some_sub); sub some_sub { my ($object, $event) = @_; } instead of making a subroutine with Name_Click. it would clean up all my scripts alot. for eg cancel buttons all do the same thing. its easier to register a routine for your events than to declare a subroutine that calls a subroutine. just my humble opinion dave