[Pharo-project] editing a method outside the image?
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
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
On Tue, Jan 4, 2011 at 5:27 PM, Stéphane Ducasse <stephane.ducasse@inria.fr>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
forget it...compile: will use #now also... On Tue, Jan 4, 2011 at 9:23 PM, Mariano Martinez Peck <marianopeck@gmail.com
wrote:
On Tue, Jan 4, 2011 at 5:27 PM, Stéphane Ducasse < stephane.ducasse@inria.fr> 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
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
participants (4)
-
Mariano Martinez Peck -
sergio_101 -
sergio_101 -
Stéphane Ducasse