How to schedule a task
Bert Freudenberg
bert at impara.de
Thu Mar 16 14:46:37 UTC 2006
Am 16.03.2006 um 12:44 schrieb Cédrick Béler:
> Hi and thanks for answering :)
>
>> However, those scripting extensions do not work in plain Squeak,
>> but only in Tweak or Croquet.
>
> Thats maybe why I don't have waitTick: :)
>
>> Also, for a 3 hour delay you might want to use a Delay ("self
>> wait: 3*60*60") instead of checking in every tick.
>
> Ok for that. When a process is waiting is it consuming
> ressources ? is it reliable ?
> If I have well understood, your advice is to use an endless loop
> instead of an instance of Scheduler ?
>
>>> I haven't the whole solution but Bert gave me an advise for such
>>> things. Define a method within your class with the task you need
>>> with an endless loop. In this loop you wait for the next tick
>>> (self waitTick). In this loop you define the loading of the XML
>>> file.
>>> Start this method as a script e.g. in the step of initializing.
>>>
>>> self startScript: #loadXML
>>
> I found a method Player>>startScript: is it the one you're
> talking about ?
No. All of this is specific to Tweak/Croquet.
In normal Squeak you would fork off a block, as described in the
other replies.
- Bert -
More information about the Squeak-dev
mailing list
|