paul at igblan.free-online.co.uk
Mon Apr 28 15:53:42 UTC 2003
I'm starting to find out where the code hooks into Morphic are. I found #fullDrawOn:, which looks like the place to put my drawing code for a pane. But I have a few simple questions.
(1) Is this the only drawing hook? What's #drawOn: for?
(2) The canvas argument my pane is passed does not seem to be clipped to the pane. This surprised me. Is this the right behaviour? Am I supposed to do my own clipping using something like #clipBy:during: ?
(3) I noticed that when my window is first creatd and displayed, #fullDrawOn: is called three times. This seems excessive. :) I'm used to battling the Windows API to stop unnecessary extra WM_PAINT messages. Am I up against the same kind of thing in Squeak?
(4) Squeak seems to have problems coping with errors during the execution of #fullDrawOn: - I get a stack dump to the screen instead of a debugger, and the image usually dies. This makes code here hard to debug. Is there a general approach to debugging drawing code to work around this?
Thanks for any help anyone can give. :)
More information about the Squeak-dev