Discussion:
FileQuit Menu Item
Paul Young
2018-04-14 15:26:20 UTC
Permalink
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
Jim Wagner
2018-04-14 15:30:11 UTC
Permalink
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/>
Post by Paul Young
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
Paul Young
2018-04-14 15:52:36 UTC
Permalink
Hi Jim,

Thanks for answering.

I don’t think I understand.

I can add Quit as a menu item (File Quit Edit 
) and add under that Quit menu item QuitQuitNow but I can’t add the Shortcut Command-Q. I want the User to see that he can use Command-Q to quit the app.

Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Jim Wagner
2018-04-14 16:24:47 UTC
Permalink
Hello, Paul -

In all of the apps I have created, Quit has always been an automatic member of the File menu and it has always, automatically, had a Command-Q shortcut.

If you select Main Menubar, in the project object list (left edge of window), Select the File item, then the Quit item and open the inspector, you should see the various attributes such as shortcuts.

Jim

James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
Post by Paul Young
Hi Jim,
Thanks for answering.
I don’t think I understand.
I can add Quit as a menu item (File Quit Edit 
) and add under that Quit menu item QuitQuitNow but I can’t add the Shortcut Command-Q. I want the User to see that he can use Command-Q to quit the app.
Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Paul Young
2018-04-14 17:52:26 UTC
Permalink
Yes, I understand that but if I choose the Super of this FileQuit menuitem to be QuitMenuItem, then Quit is not displayed when I run the app. The upper menuitems are displayed with their shortcuts but Quit is not displayed.



If I choose the super of FileQuit to be MenuItem, then I see this:



I could change Quit to Quit Command-Q
but this would certainly not be standard.

Paul Young
Post by Jim Wagner
Hello, Paul -
In all of the apps I have created, Quit has always been an automatic member of the File menu and it has always, automatically, had a Command-Q shortcut.
If you select Main Menubar, in the project object list (left edge of window), Select the File item, then the Quit item and open the inspector, you should see the various attributes such as shortcuts.
Jim
James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
Post by Paul Young
Hi Jim,
Thanks for answering.
I don’t think I understand.
I can add Quit as a menu item (File Quit Edit 
) and add under that Quit menu item QuitQuitNow but I can’t add the Shortcut Command-Q. I want the User to see that he can use Command-Q to quit the app.
Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Paul Young
2018-04-14 18:09:47 UTC
Permalink
Sorry for the noise. I now understand. I don’t remember now why but MenuBar1 must have been deleted at one point and then readded. That caused the problem.

Thank you for your response and help.

Paul Young
Post by Jim Wagner
Hello, Paul -
In all of the apps I have created, Quit has always been an automatic member of the File menu and it has always, automatically, had a Command-Q shortcut.
If you select Main Menubar, in the project object list (left edge of window), Select the File item, then the Quit item and open the inspector, you should see the various attributes such as shortcuts.
Jim
James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
Post by Paul Young
Hi Jim,
Thanks for answering.
I don’t think I understand.
I can add Quit as a menu item (File Quit Edit 
) and add under that Quit menu item QuitQuitNow but I can’t add the Shortcut Command-Q. I want the User to see that he can use Command-Q to quit the app.
Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Paul Young
2018-04-14 23:00:23 UTC
Permalink
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
Post by Jim Wagner
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/>
Post by Paul Young
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
Jim Wagner
2018-04-14 23:09:20 UTC
Permalink
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/>
Post by Paul Young
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
Post by Jim Wagner
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/>
Post by Paul Young
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
Paul Young
2018-04-14 23:32:39 UTC
Permalink
Jim,

You have been a great help. Thank you for sharing your expertise. I would never have considered trying that.

Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Post by Jim Wagner
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/>
Post by Paul Young
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
Jim Wagner
2018-04-15 00:47:24 UTC
Permalink
Did it work for you?

Jim

James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
Post by Paul Young
Jim,
You have been a great help. Thank you for sharing your expertise. I would never have considered trying that.
Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Post by Jim Wagner
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/>
Post by Paul Young
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
youngpr
2018-04-15 01:02:18 UTC
Permalink
Yes!

Paul

Sent from my iPhone 6+
Post by Jim Wagner
Did it work for you?
Jim
James Wagner
Oregon Research Electronics
http://www.orelectronics.net
Post by Paul Young
Jim,
You have been a great help. Thank you for sharing your expertise. I would never have considered trying that.
Paul Young
Post by Jim Wagner
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
Post by Paul Young
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
Post by Jim Wagner
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
Post by Paul Young
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
Jim Wagner
2018-04-15 01:11:48 UTC
Permalink
It was not any great knowledge on my part - totally trial and error.

Jim

James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
Post by youngpr
Yes!
Paul
Sent from my iPhone 6+
Post by Jim Wagner
Did it work for you?
Jim
James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
Post by Paul Young
Jim,
You have been a great help. Thank you for sharing your expertise. I would never have considered trying that.
Paul Young
Post by Jim Wagner
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/>
Post by Paul Young
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
Post by Jim Wagner
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/>
Post by Paul Young
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
Loading...