[Pythonmac-SIG] Building a PreferencePane with PyObjC?
Ronald Oussoren
ronaldoussoren at mac.com
Mon Apr 20 18:54:12 CEST 2009
On 20 Apr, 2009, at 17:24, Bill Janssen wrote:
> Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
>> 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.
>
> Thanks, Ronald.
>
> So this is part of what IB looks for when you tell it to scan the
> class
> files. I've been adding the actions myself manually to the class in
> IB,
> before ctrl-dragging the connection, which is another way of doing
> it but
> laborious.
That right. Interface Builder looks for the IBAction decorator to
define outlets and IBOutlet definitions to define outlets:
class MyController (NSObject):
outlet = objc.IBOutlet()
@objc.IBAction
def myAction_(self, sender): pass
Ronald
>
> Bill
-------------- 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/e8628825/attachment.bin>
More information about the Pythonmac-SIG
mailing list