 |
 |
What's an IBAction?
|
 |
|
 |
|
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status:
Offline
|
|
I've just been ignoring all the IBAction returns from my interface-related methods, but can you actually return something from there? I assume not, since the compiler never warns me about lacking a return value. Does anyone know for sure?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status:
Offline
|
|
Technically, IBAction is really just void. It is really only used as a 'hint' to the compiler.
[EDIT: oops, my bad. Changed null to void, which is what I meant to write, anyway.  ]
(Last edited by Turias; Dec 11, 2003 at 02:53 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Aug 2001
Location: Seattle, WA
Status:
Offline
|
|
It's actually #defined in NSNibDeclaration.h to be void, so you don't have to return anything from an IBAction method.
It's not a hint to the compiler; rather, it's there so that when Interface Builder parses a .h file, it can determine which methods should be available as "actions" to which you can make connections.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status:
Offline
|
|
Originally posted by Tim2 at Omni:
It's actually #defined in NSNibDeclaration.h to be void, so you don't have to return anything from an IBAction method.
It's not a hint to the compiler; rather, it's there so that when Interface Builder parses a .h file, it can determine which methods should be available as "actions" to which you can make connections.
That's right. I just read this yesterday, actually, but don't have the book on me. I think my brain is shorting out, again. 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |