You are writing a comment about An Epic Introduction to PyObjC and Cocoa, here is a quick summary:
PyObjC is one of the most helpful projects I have ever used, but a number of individuals have been having trouble getting started with PyObjC on Leopard because the documentation is in a bit of a disarray. In particular, there didn't seem to be a comprehensive tutorial that could introduce a newcomer to all the important aspects of PyobjC, and that was completely up to date. Here is my attempt to fill that void. With a vengeance.
You are responding to this comment written by gary on November 22nd 2008, 08:55.
Will, GREAT tutorial but I had the same problem. I'm using XCode 3.0. I tried using "Read Class Files..." (Cmd-Opt-R) in IB to read in MWController.py and then IB actually created an entry for MWController in the inspector Class drop-down and then it showed the outlets and I was able to hook them up. Should it have been inthere by the import in main.py?
I can run the app and I get the search: log message correctly so everything seems to function OK. But I do notice 3 warnings in XCode stating "The textFiled outlet of Controller is connected to 'Text Field' but 'textField' is no longer defined on MWController" with similar message for the table and button.. But MWController looks like like below and it works so it seems spurious.
Gary
class MWController(NSObject): tableView = objc.IBOutlet() textField = objc.IBOutlet() results = []
@objc.IBAction
def search_(self,sender):
search_value = self.textField.stringValue()
NSLog(u"Search: %s" % search_value)
Please be aware that comment forms go stale after one hour.
Comments may make use of LifeFlow MarkDown. Raw html will be escaped.
Quick Introduction to LifeFlow MarkDown Syntax
A highlighted code block:
Other common languages work as well: scheme, python, java, html, etc.
Other markdown syntax: