Re: NSBeginAlertSheet not waiting for button to be pushed
Uli Kusterer <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07.02.2010, at 07:41, Chad Leigh -- ObjectWerks Inc wrote: > [NSString stringWithFormat:@"message with code %@", [reply objectForKey:@"errorCode"]]); It's probably not your issue, but dangerous nonetheless: NSBeginAlertSheet()'s last parameter is already a format string, followed by the arguments. If errorCode contains a percent sign in some way, you'll get a crash or other odd behaviour when the sheet interprets it as a format and tries to interpret whatever is on the stack after the parameters as arguments. At the least, the stringWithFormat: in there is unneccessary. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de