2007-08-28 ウィンドウが閉じられるとアプリケーションも終了するようにする。 mac ruby cocoa 元ネタ(objc)。RubyCocoaでやる方法。 Interface Builderにて File's Owner→ControllerクラスインスタンスへCtrlドラッグ。 File's OwnerのdelegateにControllerクラスインスタンスを設定。アウトレット変数delegateにConnect。 (これでControllerクラスがNSAppのdelegate先になる) コントローラクラス定義にて def applicationShouldTerminateAfterLastWindowClosed(sender) true end 追加