editing a method outside the image?

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

editing a method outside the image?

sergio_101-2
one problem i having (in a long line)..

is that my DateAndTime class >> now

looks like this:

now
        ^ self basicNew
                ticks: (Duration
                                days: SqueakEpoch
                                hours: 0
                                minutes: 0
                                seconds: self totalSeconds
                                nanoSeconds: MillisecondClockOffset milliSeconds * NanosInMillisecond) ticks
                offset: self localOffset;
                yourself

the problem is, milliseconds is not defined anywhere.. this is there
as a remnant of sheduler..

i need to replace it with the REAL one:

now
        ^ self basicNew
                ticks: (Array with: SqueakEpoch with: Time totalSeconds with: 0)
                offset: self localTimeZone offset

the problem is that when i try to update "now", i keep getting the
error for that it can't find "milliSeconds"..

when i delete "now" and try to paste the correct one in.. i error out, too..

i think the snake is eating its tail..

can i replace the "now" method somehow with the image not running?

thanks!

--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

Reply | Threaded
Open this post in threaded view
|

Re: editing a method outside the image?

Stéphane Ducasse
sergio

may be you should explain us what you are trying to do?

On Jan 3, 2011, at 11:07 PM, sergio_101 wrote:

> one problem i having (in a long line)..
>
> is that my DateAndTime class >> now
>
> looks like this:
>
> now
> ^ self basicNew
> ticks: (Duration
> days: SqueakEpoch
> hours: 0
> minutes: 0
> seconds: self totalSeconds
> nanoSeconds: MillisecondClockOffset milliSeconds * NanosInMillisecond) ticks
> offset: self localOffset;
> yourself
>
> the problem is, milliseconds is not defined anywhere.. this is there
> as a remnant of sheduler..
>
> i need to replace it with the REAL one:
>
> now
> ^ self basicNew
> ticks: (Array with: SqueakEpoch with: Time totalSeconds with: 0)
> offset: self localTimeZone offset
>
> the problem is that when i try to update "now", i keep getting the
> error for that it can't find "milliSeconds"..
>
> when i delete "now" and try to paste the correct one in.. i error out, too..
>
> i think the snake is eating its tail..
>
> can i replace the "now" method somehow with the image not running?
>
> thanks!
>
> --
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> http://www.CodingForHire.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>


Reply | Threaded
Open this post in threaded view
|

Re: editing a method outside the image?

Mariano Martinez Peck


On Tue, Jan 4, 2011 at 5:27 PM, Stéphane Ducasse <[hidden email]> wrote:
sergio

may be you should explain us what you are trying to do?


he screw up his image hhahahaha
don't try to rescue it...

anyway, if you are lucky and DateAndTime >> now   is not used at startup, then you can call the VM like this:

./squeak  myScrewedUpImage.image fixToNow.st


And you in the fixToNow.st  you put something like:

DateAndTime compile: 'now
    ^ self basicNew
        ticks: (Array with: SqueakEpoch with: Time totalSeconds with: 0)
        offset: self localTimeZone offset
'

but....maybe the method is used while startup...in such case you are dead i think

cheers

mariano
 
On Jan 3, 2011, at 11:07 PM, sergio_101 wrote:

> one problem i having (in a long line)..
>
> is that my DateAndTime class >> now
>
> looks like this:
>
> now
>       ^ self basicNew
>               ticks: (Duration
>                               days: SqueakEpoch
>                               hours: 0
>                               minutes: 0
>                               seconds: self totalSeconds
>                               nanoSeconds: MillisecondClockOffset milliSeconds * NanosInMillisecond) ticks
>               offset: self localOffset;
>               yourself
>
> the problem is, milliseconds is not defined anywhere.. this is there
> as a remnant of sheduler..
>
> i need to replace it with the REAL one:
>
> now
>       ^ self basicNew
>               ticks: (Array with: SqueakEpoch with: Time totalSeconds with: 0)
>               offset: self localTimeZone offset
>
> the problem is that when i try to update "now", i keep getting the
> error for that it can't find "milliSeconds"..
>
> when i delete "now" and try to paste the correct one in.. i error out, too..
>
> i think the snake is eating its tail..
>
> can i replace the "now" method somehow with the image not running?
>
> thanks!
>
> --
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> http://www.CodingForHire.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>



Reply | Threaded
Open this post in threaded view
|

Re: editing a method outside the image?

Mariano Martinez Peck
forget it...compile: will use #now also...

On Tue, Jan 4, 2011 at 9:23 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Tue, Jan 4, 2011 at 5:27 PM, Stéphane Ducasse <[hidden email]> wrote:
sergio

may be you should explain us what you are trying to do?


he screw up his image hhahahaha
don't try to rescue it...

anyway, if you are lucky and DateAndTime >> now   is not used at startup, then you can call the VM like this:

./squeak  myScrewedUpImage.image fixToNow.st


And you in the fixToNow.st  you put something like:

DateAndTime compile: 'now

    ^ self basicNew
        ticks: (Array with: SqueakEpoch with: Time totalSeconds with: 0)
        offset: self localTimeZone offset
'

but....maybe the method is used while startup...in such case you are dead i think

cheers

mariano
 
On Jan 3, 2011, at 11:07 PM, sergio_101 wrote:

> one problem i having (in a long line)..
>
> is that my DateAndTime class >> now
>
> looks like this:
>
> now
>       ^ self basicNew
>               ticks: (Duration
>                               days: SqueakEpoch
>                               hours: 0
>                               minutes: 0
>                               seconds: self totalSeconds
>                               nanoSeconds: MillisecondClockOffset milliSeconds * NanosInMillisecond) ticks
>               offset: self localOffset;
>               yourself
>
> the problem is, milliseconds is not defined anywhere.. this is there
> as a remnant of sheduler..
>
> i need to replace it with the REAL one:
>
> now
>       ^ self basicNew
>               ticks: (Array with: SqueakEpoch with: Time totalSeconds with: 0)
>               offset: self localTimeZone offset
>
> the problem is that when i try to update "now", i keep getting the
> error for that it can't find "milliSeconds"..
>
> when i delete "now" and try to paste the correct one in.. i error out, too..
>
> i think the snake is eating its tail..
>
> can i replace the "now" method somehow with the image not running?
>
> thanks!
>
> --
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> http://www.CodingForHire.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>




Reply | Threaded
Open this post in threaded view
|

Re: editing a method outside the image?

sergio_101
>> anyway, if you are lucky and DateAndTime >> now   is not used at startup,
>> then you can call the VM like this:
>>

it appears that DateAndTime >> now is used for every function in the universe!

i finally fixed it....

what i did was, go to the method, and browse the versions to the
previous version, and hit revert..

whew!



--
----
peace,
sergio
photographer, journalist, visionary

http://www.ThoseOptimizeGuys.com
http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101