Re: Returning from an IBAction
Re: Returning from an IBAction
- Subject: Re: Returning from an IBAction
- From: "Marcus S. Zarra" <email@hidden>
- Date: Tue, 28 Mar 2006 09:24:37 -0700
IBAction is equal to void
so your return would just be:
return;
On Mar 28, 2006, at 9:16 AM, Julio Cesar Silva dos Santos wrote:
Sorry, I should have said 'should only be called if the check do
not catch an error...'.
Julio Cesar Santos
email@hidden
eMac 1GHz ComboDrive
640MB RAM
Linux User #359973
On 28/03/2006, at 13:11, Julio Cesar Silva dos Santos wrote:
Hi, I am trying to accomplish a simple task with an IBAction but
apparently it is not clear how can I return from an IBAction. My
action looks like this:
- (IBAction)myAction:(id)sender
{
//Some check
if (some_thing != other_thing)
{
NSAlert * myAlert;
//Create the alert
[myAlert beginSheetForModalWindow:...];
return ???
}
//Other code
}
Well, the 'Other code' should only be called if the check catches
an error so normally I would return nil or something else but then
I receive a warning that "return with a value, in function
returning void". How can this be done?
Thanks for any help,
Julio Cesar Santos
email@hidden
eMac 1GHz ComboDrive
640MB RAM
Linux User #359973
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden