Looking at how to do autoscrolling when drag-holding, we ran into:
WorldState>>runLocalStepmethodsIn: aWorld does interesting things with the lastStepMessage. Can anyone explain how this works?
Why does it not do anything with lastStepMessage value: now. and then test for lastStepMessage ifNotNil:
There's a comment about buggy morphs. Were they so buggy that they did a become on a message send? Or do I totally misunderstand this stuff?
Stephan
Hi Stephan,
I suspect WorldState >> #stopStepping: or WorldState >> #stopStepping:selector:. If the step message calls something like "self stopStepping", then you do not want another step call but an immediate stop of the stepping.
WorldState >> stopStepping: aMorph "Remove the given morph from the step list." lastStepMessage ifNotNil:[ (lastStepMessage receiver == aMorph) ifTrue:[lastStepMessage := nil]]. stepList removeAll: (stepList select:[:stepMsg| stepMsg receiver == aMorph]).
Hence, there is no suspicious "become" but only a nasty side-effect. :)
Best, Marcel
-- View this message in context: http://forum.world.st/How-does-runLocalStepMethodsIn-aWorld-work-tp4863844p4... Sent from the Squeak - Dev mailing list archive at Nabble.com.
I think that WorldState >> #stopStepping: (resp. Morph >> #stopStepping) is also part of the machinery for controlling buggy morphs to not go wild. Try browsing senders of #stopStepping. Therefore, you remove the morph from the stepping list before you let it step. If everything worked out fine, that is lastStepMessage is not nil, you put it into the list again.
Best, Marcel
-- View this message in context: http://forum.world.st/How-does-runLocalStepMethodsIn-aWorld-work-tp4863844p4... Sent from the Squeak - Dev mailing list archive at Nabble.com.
On 27-11-15 12:25, marcel.taeumel wrote:
Hi Stephan,
I suspect WorldState >> #stopStepping: or WorldState >> #stopStepping:selector:. If the step message calls something like "self stopStepping", then you do not want another step call but an immediate stop of the stepping.
WorldState >> stopStepping: aMorph
Hence, there is no suspicious "become" but only a nasty side-effect. :)
Ah yes, I see. Interesting approach.
Stephan
squeak-dev@lists.squeakfoundation.org