Quit without asking to save

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

Quit without asking to save

Thomas Bany
Hi !

I'm developping a desktop application for Windows and I want to prevent the user from saving the image.

First off, setting the #canSaveImage permission to false does not seems to prevent saving. But it's okey since the user won't have access to the World Menu.

However, upon quitting the VM, a dialog pop up asking if I want to quit the image without saving. Is it possible to remove it ?

Thanks in advance,

Thomas.
Reply | Threaded
Open this post in threaded view
|

Re: Quit without asking to save

EstebanLM
from the app, you quit (without saving) by executing:

Smalltalk snapshot: false andQuit: true.

in windows, to disable the annoying dialog “exit without save” when pressing the close button, you need to add:

EnableAltF4Quit=0

to the ini file (honestly, that should be the default, but is not).That will actually send a message to the image that will end in:

WorldState>>#quitSession

which is a method that handles world close.

You need to override that method to get the usage you want :)

cheers,
Esteban

On 10 Apr 2014, at 11:09, Thomas Bany <[hidden email]> wrote:

> Hi !
>
> I'm developping a desktop application for Windows and I want to prevent the user from saving the image.
>
> First off, setting the #canSaveImage permission to false does not seems to prevent saving. But it's okey since the user won't have access to the World Menu.
>
> However, upon quitting the VM, a dialog pop up asking if I want to quit the image without saving. Is it possible to remove it ?
>
> Thanks in advance,
>
> Thomas.


Reply | Threaded
Open this post in threaded view
|

Re: Quit without asking to save

Thomas Bany
Thanks !!


2014-04-10 11:43 GMT+02:00 Esteban Lorenzano <[hidden email]>:
from the app, you quit (without saving) by executing:

Smalltalk snapshot: false andQuit: true.

in windows, to disable the annoying dialog “exit without save” when pressing the close button, you need to add:

EnableAltF4Quit=0

to the ini file (honestly, that should be the default, but is not).That will actually send a message to the image that will end in:

WorldState>>#quitSession

which is a method that handles world close.

You need to override that method to get the usage you want :)

cheers,
Esteban

On 10 Apr 2014, at 11:09, Thomas Bany <[hidden email]> wrote:

> Hi !
>
> I'm developping a desktop application for Windows and I want to prevent the user from saving the image.
>
> First off, setting the #canSaveImage permission to false does not seems to prevent saving. But it's okey since the user won't have access to the World Menu.
>
> However, upon quitting the VM, a dialog pop up asking if I want to quit the image without saving. Is it possible to remove it ?
>
> Thanks in advance,
>
> Thomas.