From: Casey W. <wil...@nc...> - 2001-11-28 21:33:12
|
> > 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 I was afraid of that. :( Are threads available in wxPerl? All I *really* need to do is toggle a variable by pressing a button to make the loop stop. > ( 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 ). Thanks again! |