'From Squeak3.1alpha of 5 February 2001 [latest update: #3592] on 14 February 2001 at 11:20:40 am'! "Change Set: firstStepFix Date: 14 February 2001 Author: Bob Arning Bring back some old code so that new paintings will start ticking when they get a script"! !ScriptInstantiation methodsFor: 'status control' stamp: 'RAA 2/14/2001 11:20'! status: newStatus | stati actualMorph | actualMorph _ player costume renderedMorph. stati _ ScriptingSystem standardEventStati. (stati includes: status) ifTrue:[ actualMorph on: status send: nil to: nil. "remove old link in event handler" status == #mouseStillDown ifTrue:[actualMorph on: #mouseDown send: nil to: nil]]. (stati includes: newStatus) ifTrue:[ actualMorph on: newStatus send: selector to: player. "establish new link in evt handler" newStatus == #mouseStillDown ifTrue:[actualMorph on: #mouseDown send: selector to: player]]. status _ newStatus. (status == #ticking or:[status == #paused]) ifTrue: [lastTick _ nil]. self flag: #arNote. self flag: #workaround. "Code below was in #chooseTriggerFrom: which did not reflect status changes from other places (e.g., the stepping/pause buttons). It is not clear why this is necessary though - theoretically, any morph should step when it has a player but alas!! something is broken and I have no idea why and where." "14 feb 2001 - bob - I reinstated this after alan noticed that a newly drawn car would not go until you picked it up and dropped it. The reason is that unscripted players have #wantSteps ^false. If a morph enters the world with an unscripted player and then acquires a scripted player, that would be a good time to change, but this will work too" status == #ticking ifTrue: [ player costume isStepping ifFalse: [player costume arrangeToStartStepping] ]. ! !