Virgil Dupras avatar Virgil Dupras committed 3d6c3c9

Fixed objp-based cocoa UI which was broken.

Comments (0)

Files changed (4)

 cocoa:
  - XCode 4
  - ObjP from http://bitbucket.org/hsoft/objp
- 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.
 tk:
  - 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'],

cocoa/MainWindow.m

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

cocoa/pyplugin.py

         self.model.say_hello()
     
 
+class TextHolderView:
+    def updateText(self): pass
+
 class PyTextHolder:
     def __init__(self, view: pyref):
         self.view = view
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.