On 15 Jul '08, at 3:19 PM, Phil Faber wrote:
- (void)getCharacters:(unichar *)buffer range:(NSRange)aRange
My challenge is that I don't know what this means or how to convert
this into actual code. So I have to keep guessing which surely
can't be the preferred way to learn!
What you're
Along with what others have said, for this specific task you would
probably want to use:
-(NSString*) substringWithRange:(NSRange) range;
instead. It's fairly rare to break down strings into individual
characters.
So with your newly learned knowledge of Objective-C, you could now
write a
On Jul 15, 2008, at 4:19 PM, Phil Faber wrote:
- (void)getCharacters:(unichar *)buffer range:(NSRange)aRange
[...]
Can anyone explain how I can 'decode' the usage information shown in
the documentation into real code? Not just for this example, but in
general.
OK, let's do this one par
Hi Phil,
You're right: the documentation can take some getting used to.
Here are some tips:
When you see a method declared with a "-" out in front, such as:
- (NSString *) substringWithRange:(NSRange)range;
That means that you can only use that method on an instance of the
class. For example:
N
You're not having a problem reading the docs. You're having a problem with
your basic understanding of Objective-C. There's nothing to "convert" and
what you're reading is "actual code". I'd recommend taking a step back and
doing some reading before you go any further.
Perhaps here:
http://develop
Hi all.
As a relative newbie I'm eager to learn but my biggest stumbling block
is understanding that the XCode's Help>Documentation actually means;
can someone guide me?
For example, if I want to put a substring of a larger string (eg.
"ertyu" from "qwertyuiop") into a second field, I sea