if i want to quit the app by the mac-dock or from the applications's menu, where the app-name is topic by choose the entry called "Quit...", it doesn't respond.
how can i solve this problem?
please help

http://www.purebasic.fr/english/viewtop ... 19&t=45613'-pre defined constants of #PB_Menu_About, #PB_Menu_Preferences,#PB_Menu_Quit'
Code: Select all
If OpenWindow(0, 0, 0, 230, 90, "Event handling example...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateMenu(0, WindowID(0))
MenuTitle("File")
MenuItem(1, "One")
MenuItem(2, "Two")
MenuItem(#PB_Menu_Quit, "Quit")
EndIf
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Menu
MenuID=EventMenu() : Debug MenuID
Select MenuID
Case #PB_Menu_Quit
End
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf