can you explain that?

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

can you explain that?

Nicolai Hess
you can save the image with the  shortcut cmd+shift+s
the shortcut action is:

[ Smalltalk snapshot: true andQuit: false.
  UIManager default inform: 'Image saved' ]

Save the image and show a notification.

If you do this shortuct, the image is saved and you'll see the notification - ok.

If you close the image, without saving again and open the image again,
it starts with showing this notification again.

How can this work? The notification was sent after the image was saved.

Reply | Threaded
Open this post in threaded view
|

Re: can you explain that?

Nicolas Cellier


2015-07-03 21:22 GMT+02:00 Nicolai Hess <[hidden email]>:
you can save the image with the  shortcut cmd+shift+s
the shortcut action is:

[ Smalltalk snapshot: true andQuit: false.
  UIManager default inform: 'Image saved' ]

Save the image and show a notification.

If you do this shortuct, the image is saved and you'll see the notification - ok.

If you close the image, without saving again and open the image again,
it starts with showing this notification again.

How can this work? The notification was sent after the image was saved.


It's the activeProcess that saves the image right?
And the activeProcess is being part of the saved image...
So guess which activeProcess will get restored when the image is restarted (resumed)?

Normally, snapshoting used to answer a boolean indicating whether the image is resuming or not.
If this hasn't changed in Pharo, this should be something like:

[ (Smalltalk snapshot: true andQuit: false)
       ifFalse: [ UIManager default inform: 'Image saved' ] ]

Nicolas
Reply | Threaded
Open this post in threaded view
|

Re: can you explain that?

Nicolai Hess


2015-07-04 0:08 GMT+02:00 Nicolas Cellier <[hidden email]>:


2015-07-03 21:22 GMT+02:00 Nicolai Hess <[hidden email]>:
you can save the image with the  shortcut cmd+shift+s
the shortcut action is:

[ Smalltalk snapshot: true andQuit: false.
  UIManager default inform: 'Image saved' ]

Save the image and show a notification.

If you do this shortuct, the image is saved and you'll see the notification - ok.

If you close the image, without saving again and open the image again,
it starts with showing this notification again.

How can this work? The notification was sent after the image was saved.


It's the activeProcess that saves the image right?
And the activeProcess is being part of the saved image...
So guess which activeProcess will get restored when the image is restarted (resumed)?

Ah, of course. That explains it.

Thank you.
 

Normally, snapshoting used to answer a boolean indicating whether the image is resuming or not.
If this hasn't changed in Pharo, this should be something like:

[ (Smalltalk snapshot: true andQuit: false)
       ifFalse: [ UIManager default inform: 'Image saved' ] ]

Nicolas

Reply | Threaded
Open this post in threaded view
|

Re: can you explain that?

Nicolai Hess


2015-07-04 0:27 GMT+02:00 Nicolai Hess <[hidden email]>:


2015-07-04 0:08 GMT+02:00 Nicolas Cellier <[hidden email]>:


2015-07-03 21:22 GMT+02:00 Nicolai Hess <[hidden email]>:
you can save the image with the  shortcut cmd+shift+s
the shortcut action is:

[ Smalltalk snapshot: true andQuit: false.
  UIManager default inform: 'Image saved' ]

Save the image and show a notification.

If you do this shortuct, the image is saved and you'll see the notification - ok.

If you close the image, without saving again and open the image again,
it starts with showing this notification again.

How can this work? The notification was sent after the image was saved.


It's the activeProcess that saves the image right?
And the activeProcess is being part of the saved image...
So guess which activeProcess will get restored when the image is restarted (resumed)?

Ah, of course. That explains it.

Thank you.
 

Normally, snapshoting used to answer a boolean indicating whether the image is resuming or not.
If this hasn't changed in Pharo, this should be something like:

[ (Smalltalk snapshot: true andQuit: false)
       ifFalse: [ UIManager default inform: 'Image saved' ] ]

Yes, that works!

 

Nicolas


Reply | Threaded
Open this post in threaded view
|

Re: can you explain that?

Peter Uhnak
In reply to this post by Nicolai Hess
On Fri, Jul 3, 2015 at 9:22 PM, Nicolai Hess <[hidden email]> wrote:
you can save the image with the  shortcut cmd+shift+s

Thanks! :)

Peter