[Pythonmac-SIG] Building a PreferencePane with PyObjC?

Ronald Oussoren ronaldoussoren at mac.com
Mon Apr 20 07:37:04 CEST 2009


On 19 Apr, 2009, at 22:40, Bill Janssen wrote:

> 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?

If you don't add the IBAction decorator Interface Builder won't show  
your action methods as actions when you ctrl-drag a connection to an  
instance of your class.

Ronald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2224 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090420/98b70786/attachment.bin>


More information about the Pythonmac-SIG mailing list