Issue 3222: saveSession should return its resuming state saveSession ^ self snapshot: true andQuit: false Else we lose the resuming status....
On 9 November 2010 09:58, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
what about using some variable, like:
RunTests := true. self saveimage. RunTests := false. self saveImage.
and then in startUp:
startUp: resuming
( resuming and: [ RunTests] ) ifTrue: [ self runTests ]
but my code is executed when a menu is selected. So the interaction with startUp: is not really good.
snapshot: save andQuit: quit embedded: embeddedFlag
answers the resuming flag.
So, you can use it like:
| resumedInFirstSnapshot | resumedInFirstSnapshot := false.
"first save" (Smalltalk snapshot: save andQuit: false) ifTrue: [ ... "resuming here " resumedInFirstSnapshot := true ] "second save" (Smalltalk snapshot: save andQuit: false) ifTrue: [ ... "resuming here " resumedInFirstSnapshot ifFalse: [ ... ] ]
Stef
-- Best regards, Igor Stasenko AKA sig.