|
From: Yvon T. <tho...@fr...> - 2006-02-07 10:17:12
|
Hey all, i've written a first app using RubyCocoa, in this app i've a button "Quit" whose action is "quitter" the method "quitter" within Controller.rb, is "simply" : def quitter(sender) exit 0 end i think this is, by far, not properly done, because, when i use this button i get : /Users/yvon/work/RubyCocoa/AB2Web/build/Development/AB2Web.app/ Contents/Resources/Controller.rb:171:in `NSApplicationMain': NSApplicationMain - RBException_SystemExit - exit (OSX::OCException) from /Users/yvon/work/RubyCocoa/AB2Web/build/Development/AB2Web.app/ Contents/Resources/rb_main.rb:49 AB2Web has exited with status 1. line 171 of Controller.rb being "exit 0" and rb_main.rb : 49 being : if $0 == __FILE__ then rb_main_init OSX.NSApplicationMain(0, nil) ### line 49 end then what's the correct way to quit (no files to save) ? surprisingly, i've noticed that in "" their is no application avec a button for quitting why ? best, Yvon |