[MAXGUI] Accessing the Program Menu in Mac OS.

BlitzMax Forums/BlitzMax Programming/[MAXGUI] Accessing the Program Menu in Mac OS.

GA(Posted 2006) [#1]
I have recently finished my first major program for the Mac, however, I need to do one more thing before I upload it.

The program menu, and more specifically the quit button in the program menu. How can Blitzmax be made to recognize when this button is pressed? I've had a look in the blitzmax IDE for clues, but I could not make head or tail of it. Does anybody here have any ideas?

Thanks, help would be most helpful.


Byteemoz(Posted 2006) [#2]
The menu-entry raises the EVENT_APPTERMINATE-event:
Local window:TGadget=CreateWindow("My Window",40,40,320,240)
Repeat
	WaitEvent 
	Select EventID()
		Case EVENT_WINDOWCLOSE, EVENT_APPTERMINATE
			End
	End Select
Forever

-- Byteemoz


GA(Posted 2006) [#3]
*feels a little silly*

Thankyou very much, have a jaffa cake on me.