Hi all,
I'd like to avoid/bypass the VM-quit dialog (Win32) by handling the quitting within the image. Is there any way to do this under the current Win32 VM? I know about disabling Alt-F4 and remember to have read some posts about a #windowClose event under Linux. Disabling Alt-F4 doesn't quite do the job for me, because the VM's close button is still visible to the user. So I'd like to be notified within the image if the user presses the X-button, and then have the image react accordingly. Any help would be really appreciated! -Jens |
Am 24.10.2008 um 09:13 schrieb Jens Moenig: > > Hi all, > > I'd like to avoid/bypass the VM-quit dialog (Win32) by handling the > quitting > within the image. Is there any way to do this under the current > Win32 VM? I > know about disabling Alt-F4 and remember to have read some posts > about a > #windowClose event under Linux. Disabling Alt-F4 doesn't quite do > the job > for me, because the VM's close button is still visible to the user. > So I'd > like to be notified within the image if the user presses the X- > button, and > then have the image react accordingly. > > Any help would be really appreciated! I *think* the latest Etoys version from squeakland.org does this, but I do not use Windows so can't verify. - Bert - |
Thanks, Bert.
I just checked the latest Etoys version, and indeed found the code I was expecting in the image. Problem is, it doesn't ever get triggered under Windows. I tracked it back all the way down to the #primGetNextEvent: method in class EventSensor, and it just seems that a "type 5" (EventTypeWindow) event never gets signalled/polled. So, instead there's the VM-quit dialog again... :-( I used the Etoys VM that was bundled with the download from SqueakLand (BTW, I had to rename the installer to *.exe, it didn't have a suffix to it, but then it worked beautifully and flawlessly). Hey, that makes me remember: The Plopp VM apparently resolves the VM-quit dialog issue. Do you remember if you did anything special to it or is there some hidden aspect of the Win32 VM I'm unaware of? Thanks! -Jens
|
Am 24.10.2008 um 13:02 schrieb Jens Moenig:
> I used the Etoys VM that was bundled with the download from > SqueakLand (BTW, > I had to rename the installer to *.exe, it didn't have a suffix to > it, but > then it worked beautifully and flawlessly). > > Hey, that makes me remember: The Plopp VM apparently resolves the VM- > quit > dialog issue. Do you remember if you did anything special to it or > is there > some hidden aspect of the Win32 VM I'm unaware of? Michael would know ... but I think the Plopp VM was not special. Maybe have a look at Plopp.ini? But IIRC for Plopp we simply handled Alt-F4 in the image, I don't think it supported the close button. - Bert - |
You're right, Bert. Plopp just disables Alt-F4.
I just checked the WindowEvent code in Etoys with the latest Win32-VM I could find (3.10.7). That newest VM doesn't seem to be providing these events either. Is Windows that different from Mac or Linux? (Okay, that was a rhetorical question, sigh...) -Jens
|
Jens Moenig wrote:
> You're right, Bert. Plopp just disables Alt-F4. > > I just checked the WindowEvent code in Etoys with the latest Win32-VM I > could find (3.10.7). That newest VM doesn't seem to be providing these > events either. Is Windows that different from Mac or Linux? (Okay, that was > a rhetorical question, sigh...) if you use a current VM adding EnableAltF4Quit=0 to the .ini does the trick. It controls both F4 and the window close button behavior. Michael |
In reply to this post by Jens Mönig
Jens Moenig wrote:
> I used the Etoys VM that was bundled with the download from SqueakLand (BTW, > I had to rename the installer to *.exe, it didn't have a suffix to it, but > then it worked beautifully and flawlessly). Hmm, which browser and windows version are you using? Just checked and the installer downloads just fine including extension. Michael |
In reply to this post by Michael Rueger-6
Yes, Michael, I already know that much. But this setting just *disables* Alt-F4 as well as the close button. It does not, however, notify my image of any VM-WindowEvents, or does it?
What I want to accomplish is this: Whenever the user presses the VM's close button I want to be receiving some kind of #windowClose event, which my application can react to. I've seen all the necessary code in the new Etoys image, and I've read about these events in a post by Ian Piumarta (from last year, I think) in the Linux-VM. So, I guess my question is: Does the current (or newest) Win32-VM support these WindowEvents at all, because to me it doesn't seem so? (but it would be sooooo useful!) -Jens
|
In reply to this post by Michael Rueger-6
I used Firefox 2.0.0.17 on an ancient WindowsME machine to download the installer, then I installed on my Vista computer
|
In reply to this post by Jens Mönig
Jens Moenig wrote:
> Yes, Michael, I already know that much. But this setting just *disables* > Alt-F4 as well as the close button. It does not, however, notify my image of > any VM-WindowEvents, or does it? It should, but we just checked and it acutally doesn't. Need to investigate further... Michael |
Thanks for looking into this, Michael! This would make Squeak applications so much more professional under Windows.
-Jens
|
In reply to this post by Jens Mönig
Er well people are welcome to update some of the documentation at
http://isqueak.org/ioGetNextEvent to address the finer points of what getNextEvent tosses up, why and how to turn features on/off On Oct 24, 2008, at 4:55 AM, Jens Moenig wrote: > > You're right, Bert. Plopp just disables Alt-F4. > > I just checked the WindowEvent code in Etoys with the latest Win32- > VM I > could find (3.10.7). That newest VM doesn't seem to be providing these > events either. Is Windows that different from Mac or Linux? (Okay, > that was > a rhetorical question, sigh...) > > -Jens > > > > Bert Freudenberg wrote: >> >> Am 24.10.2008 um 13:02 schrieb Jens Moenig: >>> I used the Etoys VM that was bundled with the download from >>> SqueakLand (BTW, >>> I had to rename the installer to *.exe, it didn't have a suffix to >>> it, but >>> then it worked beautifully and flawlessly). >>> >>> Hey, that makes me remember: The Plopp VM apparently resolves the >>> VM- >>> quit >>> dialog issue. Do you remember if you did anything special to it or >>> is there >>> some hidden aspect of the Win32 VM I'm unaware of? >> >> >> Michael would know ... but I think the Plopp VM was not special. >> Maybe >> have a look at Plopp.ini? But IIRC for Plopp we simply handled Alt-F4 >> in the image, I don't think it supported the close button. >> >> - Bert - >> >> >> >> >> > > -- > View this message in context: http://www.nabble.com/Avoiding-the-VM-Quit-Dialog-under-Windows-tp20145356p20148740.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- = = = ======================================================================== John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== |
In reply to this post by Jens Mönig
Hi Jens -
I just finished uploading a new VM (3.10.8) which generates a window close event when the EnableAltF4Quit preference is turned off. I've tested it with the etoys4 image and it works as expected (for both the close button as well as Alt-F4): http://squeakvm.org/win32/release/SqueakVM-Win32-3.10.8-bin.zip http://squeakvm.org/win32/settings.html Cheers, - Andreas Jens Moenig wrote: > Yes, Michael, I already know that much. But this setting just *disables* > Alt-F4 as well as the close button. It does not, however, notify my image of > any VM-WindowEvents, or does it? > > What I want to accomplish is this: > > Whenever the user presses the VM's close button I want to be receiving some > kind of #windowClose event, which my application can react to. I've seen all > the necessary code in the new Etoys image, and I've read about these events > in a post by Ian Piumarta (from last year, I think) in the Linux-VM. So, I > guess my question is: Does the current (or newest) Win32-VM support these > WindowEvents at all, because to me it doesn't seem so? (but it would be > sooooo useful!) > > -Jens > > > Michael Rueger wrote: >> >> if you use a current VM adding >> EnableAltF4Quit=0 >> >> to the .ini does the trick. It controls both F4 and the window close >> button behavior. >> >> Michael >> >> > |
Wow Andreas! You're the man :)
Thank you so much!
|
In reply to this post by Andreas.Raab
... and I just tested it with Scratch and it also works as expected. Thanks again!
|
Free forum by Nabble | Edit this page |