| Computers Forum Index » Computer Languages (Objective-C) » Dot syntax and autocompletion... |
|
Page 1 of 1 |
|
| Author |
Message |
| Linda... |
Posted: Sat Aug 01, 2009 9:18 pm |
|
|
|
Guest
|
Just now learning ObjC. I have been watching Bill Dudney's
screencast.
If feel more comfortable with the dot syntax rather than using the
square brackets.
Why does Xcode not recognized the method and autocomplete (or suggest)
when using a method.
For instance, if I type
-(void)setTitle:(NSString *)newTitle {
title = [newTitle capitalizedString];
}
the "capitalizedString" is autocompleted (or suggested) but when I
type
-(void)setTitle:(NSString *)newTitle {
title = newTitle.capitalizedString;
}
the "capitalizedString" is NOT suggested.
Am I doing something wrong or has this not really been implemented in
ObjC 2.0?
Linda |
|
|
| Back to top |
|
|
|
| Greg Parker... |
Posted: Mon Aug 03, 2009 11:37 pm |
|
|
|
Guest
|
Linda <1anmldr1 at (no spam) gmail.com> writes:
Quote: Why does Xcode not recognized the method and autocomplete (or suggest)
when using a method.
For instance, if I type
-(void)setTitle:(NSString *)newTitle {
title = [newTitle capitalizedString];
}
the "capitalizedString" is autocompleted (or suggested) but when I
type
-(void)setTitle:(NSString *)newTitle {
title = newTitle.capitalizedString;
}
the "capitalizedString" is NOT suggested.
Xcode only autocompletes dot syntax using formal properties declared
with at (no spam) property. Property-like methods can be called with dot syntax,
but Xcode won't autocomplete them for you.
--
Greg Parker gparker at (no spam) apple.com Runtime Wrangler |
|
|
| Back to top |
|
|
|
|