CocoaでPythonするためのメモ書き
まだ一部分不明瞭だけど。
from Foundation import * from AppKit import * import objc class pythontestAppDelegate(NSObject): keyoutlet = objc.IBOutlet() @objc.IBAction def applicationDidFinishLaunching_(self, sender): NSLog("Application did finish launching.") def onkeydown_(self, sender): NSLog("on Key Down Event [" + sender.toString() + "]")
- Action | Outlet のたぶん理解したところ
- Action の設定:@objc.IBActionの下にInterfaceBuilderで接続したアクションメソッドを書く
- Outlet の設定:objc.IBOutlet()で順次取得。
- よくわからない所
- IBOutletで得られるOutletはどの順番?設定した順番なのかしら
- Actionの引数、senderのオブジェクトの型はどうなってるのかしらん