Re: Silly question
Re: Silly question
- Subject: Re: Silly question
- From: "Erik M. Buck" <email@hidden>
- Date: Thu, 20 Dec 2001 15:50:12 -0600
How about return ?
- (void) mySelector:(id) argument
{
if (condition)
{
NSBeginAlertSheet(...);
return;
}
}
However, it is considered a bad practice to have multiple returns in a
single function or method.
How about the following instead ?
- (void) mySelector:(id) argument
{
if (condition)
{
NSBeginAlertSheet(...);
}
else
{
// all of the code for the non-error case here
}
}
----- Original Message -----