[BUG]Re: step, inform and cursor disapears :-(

Karl Ramberg karl.ramberg at chello.se
Mon Feb 19 18:24:17 UTC 2001


Thanks for the answer.
Back to the drawing board:-)
Karl

Bob Arning wrote:
> 
> On Mon, 19 Feb 2001 17:30:59 +0100 Karl Ramberg <karl.ramberg at chello.se> wrote:
> >I should mention that this (the bug) happens when dragging the morph around.
> >Karl
> 
> Karl,
> 
> Here's the deal:
> 
> - doing #inform: from your #step method is a bit suspect since #inform: is going to run the morphic cycle in order to present a modal interface. Running the world cycle means hitting your step again, so strange things might happen.
> - when the hand is carrying morphs, it no longer relies on the OS to draw the cursor, but instead draws the cursor like all the rest of Squeak graphics.
> - when you send #inform:, it notes what the cursor was on entry and restores that after the menu goes away.
> 
> So here is a scenario that describes what you see
> 
> 1. The hand picks up your test morph and sets the current cursor to the blank one, intending to draw the cursor directly when it draws the thing it is carrying.
> 2. While in the hand, your morph's #step method is run, causing a menu to appear.
> 3. The menu notes the current cursor (the blank one) so that it can restore it once the menu goes away.
> 4. The menu sets the normal arrow cursor so you can select things on the menu.
> 5. You drop the morph and the cursor goes back to normal since the hand is empty.
> 6. The menu goes away and puts the cursor back to its pre-menu state (blank).
> 7. You can't see the cursor until you do something to make it reappear.
> 
> The moral of the story is not to popup menus while in the hand and probably not while in your step method.
> 
> Cheers,
> Bob





More information about the Squeak-dev mailing list