• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Returning from an IBAction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Returning from an IBAction


  • Subject: Returning from an IBAction
  • From: Julio Cesar Silva dos Santos <email@hidden>
  • Date: Tue, 28 Mar 2006 13:11:28 -0300

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
  • Follow-Ups:
    • Re: Returning from an IBAction
      • From: "I. Savant" <email@hidden>
    • Re: Returning from an IBAction
      • From: Julio Cesar Silva dos Santos <email@hidden>
  • Prev by Date: Re: Character value of 'Enter' and 'Return' Key ?
  • Next by Date: Re: Returning from an IBAction
  • Previous by thread: Re: Building for 10.3.9 PPC & 10.4 Universal
  • Next by thread: Re: Returning from an IBAction
  • Index(es):
    • Date
    • Thread