[Pythonmac-SIG] Building a PreferencePane with PyObjC?

Bill Janssen janssen at parc.com
Sun Apr 19 22:40:28 CEST 2009


Ronald Oussoren <ronaldoussoren at mac.com> wrote:

> 
> On 19 Apr, 2009, at 21:01, Bill Janssen wrote:
> 
> > Ronald Oussoren <ronaldoussoren at mac.com> wrote:
> >
> >> The example that's in the repository is fully up-to-date, although it
> >> doesn't use Interface Builder.
> >
> > Good to know.  I'd downloaded a version of the example from somewhere,
> > which seems a bit antique compared to what's in
> > http://svn.red-bean.com/pyobjc/trunk/ (I presume that's the
> > repository?).  But the repo code still has things like marking actions
> > with "@objc.IBAction", which I haven't found necessary in my code.  Is
> > that still necessary?
> 
> That isn't "still" necessary, it is necessary for the Python support
> in Interface Builder to work correctly. That's the purely functional
> reason for adding that decorator, although it also helps in
> documenting why the method is there.

"work properly"?  So, what breaks if it's omitted?  As I say, I've
written functioning Cocoa-Python code that doesn't use @objc.IBAction,
but the actions seem to get called correctly.

Bill


More information about the Pythonmac-SIG mailing list