Virgil Dupras  committed 3d6c3c9

Fixed objp-based cocoa UI which was broken.

  • Participants
  • Parent commits 0edd735

Comments (0)

Files changed (4)

  - XCode 4
  - ObjP from
- NOTE: I'm currently in the middle of developing ObjP and converting guiskel to it from PyObjC
- (as a proof of concept). Currently, the executable produced can only be ran on the dev machine.
  - None
     import pyplugin
     objp.o2p.generate_objc_code(pyplugin.PyMainWindow, 'cocoa/autogen')
     objp.o2p.generate_objc_code(pyplugin.PyTextHolder, 'cocoa/autogen')
-    objp.p2o.generate_python_proxy_code('cocoa/TextHolderView.h', 'build/TextHolderView.m')
+    textholder_spec = objp.o2p.spec_from_python_class(pyplugin.TextHolderView)
+    objp.p2o.generate_python_proxy_code_from_clsspec([textholder_spec], 'build/TextHolderView.m')
     from setuptools import setup, Extension
     exts = [
         Extension("TextHolderView", ['build/TextHolderView.m', 'build/ObjP.m'],

File cocoa/MainWindow.m

-#import <Python.h>
 #import "MainWindow.h"
 #import "PyMainWindow.h"

File cocoa/

+class TextHolderView:
+    def updateText(self): pass
 class PyTextHolder:
     def __init__(self, view: pyref):
         self.view = view