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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Jerome Peace
Hi

In 7038 (and a bunch of previous recent images) the
postscript of Unnamed1 contains

"Postscript:
..."

|repository|
repository := MCHttpRepository
                location:
'http://source.squeakfoundation.org/39a'
                user: ''
                password: ''.
(repository loadVersionFromFileNamed:
'ScriptLoader-sd.173.mcz') load.

ScriptLoader new updateFrom7025

-----

This has caught many unaware.
The changeset gets renamed and saved w/o being checked
for an active postscript. Then later someone complains
e.g.

http://bugs.impara.de/view.php?id=3804 

----------------------------------------------------------------------

 andreas - 07-09-06 04:06  
----------------------------------------------------------------------

.... Also, *PLEASE* make sure you test your change
sets
before submitting them here - one of them had an eerie
postscript which
tried to update the entire image!!!



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.

What I can't figure out is the incantation that
returns the Some-object-representing-me.

Yours in service, -- Jerome Peace


P.S.

If that can't be done then the changeset should at
least be named 'RemovePostscriptFirst" instead of
Unnamed1.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

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

stéphane ducasse-2
You should check your changeset.

Stef

On 9 juil. 06, at 06:28, Peace Jerome wrote:

> Hi
>
> In 7038 (and a bunch of previous recent images) the
> postscript of Unnamed1 contains
>
> "Postscript:
> ..."
>
> |repository|
> repository := MCHttpRepository
>                 location:
> 'http://source.squeakfoundation.org/39a'
>                 user: ''
>                 password: ''.
> (repository loadVersionFromFileNamed:
> 'ScriptLoader-sd.173.mcz') load.
>
> ScriptLoader new updateFrom7025
>
> -----
>
> This has caught many unaware.
> The changeset gets renamed and saved w/o being checked
> for an active postscript. Then later someone complains
> e.g.
>
> http://bugs.impara.de/view.php?id=3804
>
> ----------------------------------------------------------------------
>
>  andreas - 07-09-06 04:06
> ----------------------------------------------------------------------
>
> .... Also, *PLEASE* make sure you test your change
> sets
> before submitting them here - one of them had an eerie
> postscript which
> tried to update the entire image!!!
>
>
>
> 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.
>
> What I can't figure out is the incantation that
> returns the Some-object-representing-me.
>
> Yours in service, -- Jerome Peace
>
>
> P.S.
>
> If that can't be done then the changeset should at
> least be named 'RemovePostscriptFirst" instead of
> Unnamed1.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


Reply | Threaded
Open this post in threaded view
|

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

Bert Freudenberg-3
In reply to this post by Jerome Peace

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 -


Reply | Threaded
Open this post in threaded view
|

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

karl-8
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