Re: FileQuit Menu Item

Jim Wagner <[email protected]> Sat, 14 Apr 2018 16:09:20 -0700
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <[email protected]>
That was what I found on a couple of applications of that compiler era. I had a simple quit statement in the close event, and it would crash, 95% of the time. As soon as I added a CancelClose event handler and put an additional quit there, everything seemed stable and reliable.

Jim

James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>




> On Apr 14, 2018, at 4:00 PM, Paul Young <[email protected]> wrote:
> 
> Jim,
> 
> Some years ago I deleted the File menu on some of my apps because I expected to use the Red Close button on Window1 to quit the app (and did not need to Open/Save a file, etc).  I see that that was a serious mistake now that we need to compile 64 bit code.
> 
> I found that adding a new MenuBar1 is not as simple as I expected for several reasons.
> 
> I would like to pursue your second comment and enable the Red Close button.  I do not use a CancelQuit event in my app.   The code in my Window1 Close event handler is very simple:  Save the Preferences and then Quit.
> 
> Did you mean that I should add a CancelClose event to Window1 and add Quit as the code?
> 
> Paul Young 
> 
>> On Apr 14, 2018, at 11:30 AM, Jim Wagner <[email protected] <mailto:[email protected]>> wrote:
>> 
>> You may have to add your own Quit menu handler.
>> 
>> In some apps, I found that I needed to add a quit command to the CancelQuit event. If I did not, it would crash as you describe.
>> 
>> Jim
>> 
>> James Wagner
>> Oregon Research Electronics
>> http://www.orelectronics.net <http://www.orelectronics.net/>
>> 
>> 
>> 
>> 
>>> On Apr 14, 2018, at 8:26 AM, Paul Young <[email protected] <mailto:[email protected]>> wrote:
>>> 
>>> I am using Xojo 2017 Release 3 for Mac to compile for 64 bits.
>>> 
>>> Using the Red Close button on Window1 results in an exception thrown about one out of twenty times when compiling for 64 bits.  I have disabled the Red Close button and plan to use the Command-Q shortcut to quit the app.
>>> 
>>> Problem:  I have FileQuit at the bottom of MenuBar1 menu items and Command-Q does close the app but I do not see Quit under the File menu item when the app is running in the IDE or when compiled.  I do see the other File menu items.
>>> 
>>> Why is this?
>>> 
>>> Paul Young
>> 
>