« Return to Thread: Tweak Bootstrap Script Scheduleing

Tweak Bootstrap Script Scheduleing

by Jens Lincke :: Rate this Message:

Reply to Author | View in Thread

Hi,

When bootstraping a CWorldPlayer from Morphic the ScriptScheduler is
added in initialize if nil. But already registered Scripts like a
onDragDrop: in a CWorldWorld subclass have no scheduler and get
suspended when triggered...

Is the solution to patch the scheduler into the script in this case
(like Bert Freudenberg proposed) ok?

CWorldPlayer>>initialize
        "Bootstrap a new world"
        super initialize.
        scheduler ifNil:[
                scheduler := ScriptScheduler new.
                "set the context for any newly spawned scripts"
                scheduler run.
                self myScripts do: [:eachScript |
                        eachScript setScheduler: scheduler.
                ]
        ].
         ...


- Jens Lincke -
_______________________________________________
Tweak mailing list
Tweak@...
http://impara.de/mailman/listinfo/tweak

 « Return to Thread: Tweak Bootstrap Script Scheduleing