Re: What are the limitations of Dot Syntax?

2008-12-06 Thread Charles Srstka
On Dec 5, 2008, at 10:06 PM, Bill Bumgarner wrote: Not really. 'name' is still something that is an accessor type thing, regardless of whether it is derived or declared via @property() dot abuse refers to expressions like: foo.retain; bar.lockFocusIfCanDraw; That is, expressions where you

Re: What are the limitations of Dot Syntax?

2008-12-06 Thread jmunson
Namaste! I'm going to add my two cents here (despite being a noob). I like the dot syntax. Why? (and before I go any further, I realize this is not a Windows forum, and also realize this is a very general set of statements and quite open to debate) Because, in the Windows world at

Re: What are the limitations of Dot Syntax?

2008-12-06 Thread Bill Bumgarner
On Dec 6, 2008, at 11:15 AM, Charles Srstka wrote: So would something which is clearly not a property, but still returns an object, such as: myObj = mySet.anyObject; or: enumerator = myArray.objectEnumerator; be considered kosher? If you can write that and sleep well at night, then

What are the limitations of Dot Syntax?

2008-12-05 Thread Jerry Krinock
I've been having some unexpected results trying to compile code using Objective-C's Dot Syntax. I realize that this may be due to an important question that I didn't find the answer to when I read about Objective-C 2.0 Properties is: Can you use the dot syntax for regular messages that

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread glenn andreas
On Dec 5, 2008, at 6:32 PM, Jerry Krinock wrote: I've been having some unexpected results trying to compile code using Objective-C's Dot Syntax. I realize that this may be due to an important question that I didn't find the answer to when I read about Objective-C 2.0 Properties is: Can

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Jerry Krinock
On 2008 Dec, 05, at 16:44, glenn andreas wrote: On Dec 5, 2008, at 6:32 PM, Jerry Krinock wrote: I've been having some unexpected results trying to compile code using Objective-C's Dot Syntax. I realize that this may be due to an important question that I didn't find the answer to when

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Luke Hiesterman
The compiler must be able to resolve the class for dot syntax to work. Try casting. Luke Sent from my iPhone. On Dec 5, 2008, at 4:32 PM, Jerry Krinock [EMAIL PROTECTED] wrote: I've been having some unexpected results trying to compile code using Objective-C's Dot Syntax. I realize that

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Chris Hanson
On Dec 5, 2008, at 5:24 PM, Jerry Krinock wrote: Thanks for the quick answer to Glenn and Bill. So now, knowing what was legal, I was able to compile the following using as many dots as legally possible: NSString* name = ((Bird*)[foo.bar.birds anyObject]).name ; where bar is

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Jerry Krinock
On 2008 Dec, 05, at 18:40, Chris Hanson wrote: Dot syntax compiles to objc_msgSend* just like bracket syntax does. However, it must see either getter/setter declarations or an @property declaration to know what selector to put in the objc_msgSend* that it compiles to. I understand why

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Clark Cox
On Fri, Dec 5, 2008 at 7:55 PM, Jerry Krinock [EMAIL PROTECTED] wrote: On 2008 Dec, 05, at 18:40, Chris Hanson wrote: Dot syntax compiles to objc_msgSend* just like bracket syntax does. However, it must see either getter/setter declarations or an @property declaration to know what selector

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Jim Correia
On Dec 5, 2008, at 10:55 PM, Jerry Krinock wrote: On 2008 Dec, 05, at 18:40, Chris Hanson wrote: Dot syntax compiles to objc_msgSend* just like bracket syntax does. However, it must see either getter/setter declarations or an @property declaration to know what selector to put in the

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Bill Bumgarner
On Dec 5, 2008, at 7:55 PM, Jerry Krinock wrote: I understand why this must be so, but it makes the dot syntax difficult to use in practice. When writing a message, I have to stop and think, Gee did I declare that as a property or not? If I'm not sure, and have to click to my

Re: What are the limitations of Dot Syntax?

2008-12-05 Thread Jerry Krinock
On 2008 Dec, 05, at 20:06, Jim Correia wrote: Why would you refactor your code so that name is no longer a property? Name is still a conceptually a property, but it is dependent on firstName and lastName, and read only now. @property(nonatomic, readonly) NSString *name; /* or fullName