Alain Wrobel wrote: > 1) Why the call to the waiting routine (fn attente) seems to occure sometimes after print "beginning container", sometimes in the middle of print gContainer, sometimes after print gContainer and not after print "end container". This problem is due to the way printed output is flushed from the window buffer to the screen (so as to become visible). If a program is handling events, flushing is automatically done by the system; no problem arises. If a program is not handling events, it relies on the FB runtime to perform the flush, which it does after every 'print' statement. But, as a somwhat dubious optimization, flushing at intervals less than 16 ms is suppressed. Time-dependent suppression explains the inconsistent drawing that you describe. A workaround is to call HIWindowFlush() '--------------- toolbox fn HIWindowFlush( ptr inWindow ) = OSStatus print "Click the window" print "Done" //FlushWindowBuffer // doesn't help //fn HIWindowFlush( window( _wndRef ) ) // uncomment to fix bug do delay 10 until fn Button HandleEvents '---------------- I'm not sure that the runtime's 'optimization' makes much sense, and opened a new bug: 564 Open Cosmetic Only first line of 'print'ed text shows when events are not being handled Robert P.