Matthias <neeri@iis.ee.ethz.ch> writes Wed, 18 Nov 1998: >ajf@afco.demon.co.uk (Alan Fry) writes: >>I haven't got to the bottom of this, but suspect it is to do with knowing >>when it is safe to change the graphics port(s). You can say 'SetPort(here)' >>and then 'now draw this here', but MacOS gives no indication back (so far >>as I can see) when it has finished. Hence you don't know when it is safe to >>release the port. > >I suspect that the problem is a bit different: At the toolbox level, QuickDraw >*is* synchronous. However, MacPerl has a rather tricky execution model because >the cursor spinning and event handling is interleaved with normal execution. In >some versions of MacPerl, this led to the current GrafPort being changed behind >the programmer's back. The 21May98 release in the MacPerl beta directory >represents my latest attempt to fix these problems. Since writing (on 14 November) I have tried the scripts again and I cannot reproduce the previous (May/June 98) crashes. In any case the earlier experiments were after the alterations to QDOffscreen and therefore after the fix to stop the spin cursor inadvertently changing the graphics port, so I don't _think_ that was the cause. Subsequent to the 21May98 modification I have seen no instances whatever of the graphics port changing unexpectedly. However having got the scripts to function, another related problem has come to light namely the change to MacPerl in respect of event handling. I think, in the original MacPerl Toolbox, there was a 'massive re-entry problem' which was eliminated in version v5.2.0? However it seems the current event handling arrangements slow execution down considerably in some circumstances. I have come to the conclusion a 'pure MacPerl progress bar' imposes too great a time overhead from this cause to make it generally useful :( I will be happy to send experimental scripts which demonstrate this effect to anyone interested. Alan Fry ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch