Jens Lincke
2006-10-10 11:51:44 UTC
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 -
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 -