On 20 Apr, 2009, at 17:24, Bill Janssen wrote:

Ronald Oussoren <ronaldousso...@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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to