Re: Weird error with structs and @try/@catch
Re: Weird error with structs and @try/@catch
- Subject: Re: Weird error with structs and @try/@catch
- From: Shaun Wexler <email@hidden>
- Date: Wed, 10 May 2006 18:02:42 -0700
On May 10, 2006, at 5:06 PM, Glen Simmons wrote:
Why does this code:
NSRect aRect = NSMakeRect(0,0,50,50);
NSString* aString = @"aString";
@try {
// Some exception throwing code here
}
@catch(NSException* exception) {
// Handle the exception
}
[self foo:aRect];
[self bar:aString];
produce this error:
error: no matching function for call to '_NSRect::_NSRect(volatile
NSRect&)'
for the NSRect, but not the NSString? And is there a fix?
This is a bug, for sure... but for a workaround, can't you just
recast it?
[self foo:(NSRect)aRect];
;)
--
Shaun Wexler
MacFOH
http://www.macfoh.com
"Problems cannot be solved by the same level of thinking that created
them." - Albert Einstein
_______________________________________________
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