On Fri, 27 Feb 2004 19:37:48 +0100 (ora solare Europa occidentale), Mattia
Barbon wrote
> > I've tried defining a class that inherits from Wx::Event. However,
> > Wx::Event->new isn't implimented, so I am unable to create an event
> > to pass to
> > $obj->ProcessEvent(). And I'm not 100% certain that that is what I
> > need to do
> > anyway.
> That is what you need to do. Jyst use Wx::PlEvent and Wx::PlCommandEvent.
That works perfectly. Thanks.
> I am not sure wxWidgets event system is flexible enought for that
> (I think you would rather use something like the Observer/Observable
> pattern, because it allows multiple subscribers, while wxWidgets
> events are tailored to GUI events).
You're probably right. I've not decided what I'm going to do yet. Some of the
events I'm thinking of might fit quite nicely with the wxWidgets events. Some
others might be a kludge. I've looked at Class::MVC and Class::Observable and
they look fairly close to what I need. Or I might just roll my own. But it's
good to know that you can define custom events.
Thanks
--simon
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|