Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Nick Zitzmann
On Sep 28, 2010, at 6:10 PM, Dave Carrigan wrote: > Objective-C != Objective-C++ > > And it is a reserved word in Objective-C++. I know; I was just wondering if there was a workaround that would tell the ObjC++ compiler to treat the property as if it was in ObjC (where it is not a reserved wo

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Rob Ross
On Sep 28, 2010, at 4:19 PM, Nick Zitzmann wrote: > @property(assign,getter=isPrivate) BOOL private; What about trying @property(assign) BOOL isPrivate; ? Rob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Dave Carrigan
On Sep 28, 2010, at 4:57 PM, Nick Zitzmann wrote: > > On Sep 28, 2010, at 5:51 PM, Ricky Sharp wrote: > >> Why do you need to use the exact name of "private"? > > Because the object in question has a "private" state. > >> You should never name things using reserved words. > > But it's not a

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Nick Zitzmann
On Sep 28, 2010, at 6:07 PM, Greg Parker wrote: >> How do I create a property for a class named "private" and not have the >> Objective-C++ compiler trip on it? > > You can't. C++ reserved words are unavailable for use in Objective-C++. The > only exception is in method names. Okay, thank you

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Greg Parker
On Sep 28, 2010, at 4:19 PM, Nick Zitzmann wrote: > Okay, I tried searching, and didn't find anything pertinent... > > How do I create a property for a class named "private" and not have the > Objective-C++ compiler trip on it? You can't. C++ reserved words are unavailable for use in Objective-C

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Nick Zitzmann
On Sep 28, 2010, at 5:51 PM, Ricky Sharp wrote: > Why do you need to use the exact name of "private"? Because the object in question has a "private" state. > You should never name things using reserved words. But it's not a reserved word in Objective-C. "@private" is, "private" is not. Nick

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Ricky Sharp
On Sep 28, 2010, at 6:19 PM, Nick Zitzmann wrote: > Okay, I tried searching, and didn't find anything pertinent... > > How do I create a property for a class named "private" and not have the > Objective-C++ compiler trip on it? > > Here's what I first tried: > > @property(assign,getter=isPriv

Declaring a property named "private" and ObjC++

2010-09-28 Thread Nick Zitzmann
Okay, I tried searching, and didn't find anything pertinent... How do I create a property for a class named "private" and not have the Objective-C++ compiler trip on it? Here's what I first tried: @property(assign,getter=isPrivate) BOOL private; That @property declaration works just fine when