[Help] After you've run a postscript, how do you get it to delete itself?

karl karl.ramberg at chello.se
Sun Jul 9 12:35:19 UTC 2006


Bert Freudenberg skrev:
>
> Am 09.07.2006 um 06:28 schrieb Peace Jerome:
>
>> I figure is should be easy to add something to the
>> postscript so that is says
>>
>> Blah. Blah. Blah.
>>
>> Load the world.
>>
>> "And be nice"
>>
>> Some-object-representing-me removePostscript.
>
> Much better:
>
> check-whether-i-need-to-run-this-postscript ifTrue: [
>     Blah. Blah. Blah.
>
>     Load the world.
> ]
>
> Deleting something from the changeset makes it work magically, you 
> cannot tell by looking at the CS what it did. Bad practice, IMNSHO.
>
> - Bert -
>
>
>
The problem is that the current changeset has the postscript so maybe 
the best would be for the
postscript to make a new changeset and make that the current one, by 
adding something like this:

ChangeSet newChanges: ChangeSet new

Karl



More information about the Squeak-dev mailing list