In message <online-1411981045500001@86-ppp-its.caltech.edu> Jeff Clites writes: >In article <mac-perl.E0zeiOh-0001ew-00@post.mail.demon.net>, >ajf@afco.demon.co.uk (Alan Fry) wrote: > >>I have experimented on and off with MacPerl 'status' indicators for some >>time and have not found one which is secure. Problems (crashes) can occur >>if there if there is extensive drawing going on in other MacPerl windows. > >I might be misunderstanding what you mean, but the "now draw this here" >method shouldn't return until the drawing is done. If the port switched at >the wrong time you could get a crash but you would likely see some visual >indication (junk being drawn in another window) as well. My apologies, I did not make myself quite clear. The script involved calculates values for a somewhat pathological function and plots the results offscreen. The process takes four or five minutes. (The reason about drawing the picture offscreen is simply so that the final window updates without the need for recalculation.) Since nothing can be seen of the offscreen world during this time, the script, at intervals, calls a subroutine which sends AE's to PBar to record the current state of progress with the calculations. On its return from the subroutine, the script calls SetGWorld() (the offscreen version of SetPort()) and continues with the calculation and plotting. This all works without any problems. However if the application 'Progress Bar' is replaced by a Perl module doing pretty much the sme thing as PBar, the machine crashes. I have not got to the bottom of this. In other circumstances (not involving graphics) the same Perl module will work properly. I suspect (based on profound ignorance of what goes on under the hood) that the subroutine returns, and SetGWorld() gets called, *before* QuickDraw has actually finished. I suppose what I am really suggesting here is that MacPerl doesn't 'know' what the MacOS is up to at any particular time. I would be happy if anyone would be game to play with this script and some Perl status-indicating scripts and see if they can shed any light on the matter. (BTW the 19th May 1998 versions of the QuickDraw and QDOffscreen library files need to be installed first. I can include these with the other files.) >>Incidentally (in the PS to Eric's leter) what is meant by 'indeterminate >>state' and why is that wanted? > >I think this is the "barber pole" progress bar, for those times when you >feel like you should have a progress bar but don't have a way to measure >the progress. Oh -- the barber's pole. I've often wondered where that lived. Is it a CDEF like the bar or what? Come to that where is the documentation that says the ID for the bar CDEF is 80? Eric Albert cleverly sussed it out. I can't find it in IM. Alan Fry ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch