nspytyon.

COCOA.
今すぐダウンロード

nspytyon. ランキングとまとめ

広告

  • Rating:
  • ライセンス:
  • MIT/X Consortium Lic...
  • 価格:
  • FREE
  • 出版社名:
  • Juraj Sukop
  • 出版社のWebサイト:
  • http://bitbucket.org/sukop/

nspytyon. タグ


nspytyon. 説明

NSPytyonは、Cocoa.Installcopy Python検索パスにパッケージを使用する必要があります。 .OverViewObjective C:@ "hello" @ selector(setDelegate :) ; ; initwithutf8string: "hello"] ; 。代わりにNSPythonを指定してください。 alloc()initwithutf8string _( 'hello')。autorelease()get_super(self).init()サブクラスのサブクラスのメソッドを目標Cランタイムで認識可能にすると、2つの可能性があります。スーパークラスに既に存在するメソッドをオーバーライドすると、完了です。しかし、あなたがタイプアノテーションでそれを飾る必要があるならば、クラスMyString(NSString):def initwithutf8string_(self、string):pass @types( 'id'、 'char *')@classmethod defantherstringWithutf8string_(self、文字列):aspherInitwithutf8string_(self、string):asthereはサポートされている型のリストです(オブジェクトの場合は、nsstring *の代わりにIDを使用するだけではなく):BOOL、 BOOL *、int、短い、長い、長い長い、長い長い長い長い長い*、符号なしの範囲、符号なしの範囲、符号なしの短い短い短い*、符号なし長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い、句、double、 double *、void、void *、const void *、char *、char **、const char *、unichar *、const unichar *、id、id *、class、sel、nsinteger、nsuinteger、nsrange、nsrange *、nsrangepointer、 CGPoint、CGSize、CGRECT、NSPOINT、NSSIZE、NSRECTEXAMPLE(Minimalist Cocoaプログラミングに基づく)NSPython Import *クラスAppDelegate(NSObject):@Types( 'Void'、 'ID')DEF ApplicationWillFinishlau nching_(self、通知): 'hello!' nsautoreleasepool.new()app = nsapplication.sharedApplication()app.setActivationPolicy_(nsApplationActivationPolicyLegular)appDelegate = appdelegate.new()app.setdelegate_(appDelegate)menubar = nsmenu.new() .auturelease()AppMenuItem = nsmenuitem.new()。autorelease()menubar.additem_(appmenuitem)app.setmainmenu_(メニューバー)AppMenu = nsmenu.new()。AutoRelease()AppName = NSProcessInfo.ProcessInfo()。processName()QuitTitle =( 'quit').StringByAppendingString_(appname)quitmenuitem = nsmenuitem.alloc()。initwithtitle_action_keyequivalent_(quittitle、sel( 'terminate:')、at( 'q'))。Autorelease()AppMenu.Additem_(QuitMenuItem)AppMenuItem .setsubmenu_(AppMenu)Window = nswindow.alloc()。initWithContentRect_StyleMask_backing_defer_(NSmakerect(0,0,200,200)、NSBackingStoreBuffered、False).autorElease()window.cascadetopleftfrompoint_(nsmakepoint(20,20))window.settitle_ (appname)window.makekeyandOrderfront_(なし)app.activateignoreRotherApps_(true )app.run()referenceeload(name) - nameselという名前のダイナミックライブラリをロードします。タイプ@ ibaction - @Typesのための短距離( 'void'、 'id')nsObject - Cocoa NSObjectGet_Super(self) - Objective C Super Kerworkat(String) - Python StringStrからNSStringインスタンスを作成します。 String) - NSString文字列をPythonNotesIfに変換すると、さまざまなメモリの所有権に注意してください。つまり、これはうまくいきません.CallentScrollPosition = ThesCrollView.ContentView()。bounds()代わりに、次のように書き込みます.b = ThesCrollView.ContentView()。bounds()ThesCrollView.DocumentView()。ScrollPoint_(B.origin)製品のホームページ


nspytyon. 関連ソフトウェア