In article <p05010400b6ef3fcf9e7a@[158.152.146.73]>, Alan Fry <[EMAIL PROTECTED]>
writes:
> However in the case of the script involving the browser the problem
> does not seem to arise during the BEGIN sequence but later on as the
> script runs. For instance the script 'hangs' at the lines:
> ICGeneralFindConfigFile($ICInstance); # open InternetConfig
> ICLaunchURL($ICInstance, 0, $url); # launch browser
> If a 'force quit' is invoked for MacPerl, and after MacPerl has gone
> away, InternetConfig does its stuff and launches the default browser.
> From this I get the feeling that somehow the presence of 'Events.pm'
> somehow traps the AppleEvent sent (by whom?) to the browser. Does
> this make sense?
> Empirically I find that a 'WaitNextEvent' after those InternetConfig
> lines 'clears the air' and the launch proceeds. To be precise, one
> 'Wait' seems enough for 'Netscape' and about three are needed for
> 'IE'.
Ah! Now that rings a bell (I haven't actually done much toolbox Perl
programming in a long time, so your first post didn't trigger much). Now,
though, I seem to remember that the issue is that the inclusion of
Mac::Events is the trigger for switching MacPerl from implicit event handling
(MacPerl does it for you) to explicit event handling (MacPerl avoids handling
events unless you call WaitNextEvent explicitly).
I'm sorry if this is inconveniencing you, but I seem to remember that this
seemed like the only reasonable way to reconcile the needs of plain perl
scripts with the needs of fancy tooplbox clients.
Matthias
--
Matthias Neeracher <[EMAIL PROTECTED]> http://www.iis.ee.ethz.ch/~neeri
"And that's why I am going to turn this world upside down, and make
of it a fire so *bright* that someone real will notice"
-- Vernor Vinge, _Tatja Grimm's World_