Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > What's an IBAction?

What's an IBAction?
Thread Tools
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Dec 11, 2003, 01:26 PM
 
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
Reply With Quote
Dec 11, 2003, 01:48 PM
 
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
Reply With Quote
Dec 11, 2003, 02:49 PM
 
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.
Tim Omernick
Engineer, The Omni Group
     
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status: Offline
Reply With Quote
Dec 11, 2003, 02:54 PM
 
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.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2