"Exit" button in MAC OSX

in my program I add a button and defined it works as a “quit” button, which means click that is just as press “cmd+Q”. The whole app should quit, in my code, I use

self.Close
app.AutoQuit = True

I am not sure if I use the correct method to that, but this piece of code is working as I expected. My question is, in XOJO under MAC OSX environment, is there any method like self.quit to do that? My app is transfer from a win32 program. In Win32, self.Close is enough for user to quit exe file. but this one in Mac OSX only close the window but not quit the app. More headache thing is if the window is the last window, and user close it, the app becomes a zombie, unless you know to press “cmd+Q”.

Try using just “Quit”

Also, you only need to set AutoQuit once, so you can put that into the App.Open event. After that, the app will quit automatically after the last window is closed so your “exit” buttons can just have self.Close.

Does this cmd will work in both platform, win and mac OSX? Thanks!

All platforms, yes.