From: Mattia B. <mb...@ds...> - 2001-11-28 21:18:03
|
> Hey guys, > I've been seaching through the doc's for a way to fire off Events even if I'm running a loop such as... > > foreach my $i (0..999999) {...} > > I've found the Yield() and SafeYield() functions. But those only allow the GUI to be updated for interaction, but don't allow the functions tied to the events to be called. At least, as far as I can tell anyhow. Anyone have any advice? The only "real" solution to your problem is to use threads; as an ( ugly ) workaround you might use a wxTimer; using wxYield is _strongly_ discouraged because it can lead to unexpected reentrancy problems ( of course there are cases where you can't do without ). I never used it, so I can't tell if the handlers not being fired is a wxPerl or a wxWindows problem ( will check ). Regards Mattia |