[squeak-dev] Snapshot and Startup
Javier Reyes
jreyes at gmail.com
Wed Jul 16 17:46:15 UTC 2008
Hi Eliot,
I have tried wrapping snapshot:andQuit:embedded: in different ways freezing
the system all the time. The minimal intervention I could figure out from
your message has been this ( I think I understand now why I never thought
about writing something like BrouHaHa ;-)
------------
snapshot:andQuit:embedded:
...
....
...
Smalltalk *myProcessStartUpList:* resuming == true.
resuming == true ifTrue:[
self setPlatformPreferences.
self recordStartupStamp].
Smalltalk isMorphic ifTrue: [SystemWindow wakeUpTopWindowUponStartup].
"Now it's time to raise an error"
resuming == nil ifTrue: [self error:'Failed to write image file (disk
full?)'].
^ resuming! !
------------
*myProcessStartUpList:* resuming
"Send #startUp to each class that needs to run initialization after a
snapshot."
self send: #startUp: toClassesNamedIn: (*self lista*) with: resuming.
! !
----------
!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'jr 7/16/2008
19:17'!
*lista*
(StartUpList select: [:a| (a==#*MyAppSingletonClass)* not]).
! !
----------
Best,
Javier
On Wed, Jul 16, 2008 at 5:27 PM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:
>
>
> On Wed, Jul 16, 2008 at 8:00 AM, Javier Reyes <jreyes at gmail.com> wrote:
>
>> Hello All,
>>
>> ¿Is there a way to save the current image without invoking all the
>> registered startup methods immediately ?
>>
>
> Write your own surround to the snapshot primitive and you can make the
> startup do whatever you want. Have a look
> at SystemDictionary>>snapshot:andQuit:embedded: and what it does after it
> calls snapshotPrimitive.
>
>
>
>
>>
>>
>> Best,
>> Javier Reyes
>>
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080716/c93fc124/attachment.htm
More information about the Squeak-dev
mailing list
|