• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie: How to understand Xcode's documentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: How to understand Xcode's documentation


  • Subject: Re: Newbie: How to understand Xcode's documentation
  • From: "Jason Sallis" <email@hidden>
  • Date: Tue, 15 Jul 2008 16:27:08 -0600

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://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/ObjC.pdf

and here:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/ObjCTutorial.pdf

- Jason


On Tue, Jul 15, 2008 at 4:19 PM, Phil Faber <email@hidden> wrote:

> 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 search the documentation and come
> across a thing under NSString called getCharacters:range.  I assume this
> will do the job as it seems to get characters from a string as specified by
> a range;  I then look at the usage information which reads:
>
> - (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!
>
>
> So I try:
>
> [newField setStringValue:[NSString getCharacters:buffer range:2,3]];
>
> ..and am told:
>
> error: 'buffer' undeclared
> warning: 'NSString' may not respond to '+getCharacters:range:'
>
>
> ..so I try:
>
> [newField setStringValue:[NSString getCharacters:2,3]];
>
> ..and am told:
>
> warning: 'NSString' may not respond to '+getCharacters:'
>
>
> .. so I try:
>
> [newField setStringValue:[NSString getCharacters:buffer range:2-3]];
>
> ..and am told:
>
> error: 'buffer' undeclared
> warning: 'NSString' may not respond to '+getCharacters:range:'
>
>
> ..and so on.
>
> I'm a newbie; I'm still learning how to do simply stuff like add two
> numbers together, display 'hello world' and so on!  What I could really do
> with is the documentation giving examples.
>
> 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.
>
> If I can't understand this, I fear I'll spend most of my time asking others
> how to achieve the most basic of tasks.
>
> Thanks.
>
> Phil
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Newbie: How to understand Xcode's documentation (From: Phil Faber <email@hidden>)

  • Prev by Date: Re: [Q] Any document that shows differences of Cocoa, programming for Mac and for the iPhone/iPod touch?
  • Next by Date: Re: Newbie: How to understand Xcode's documentation
  • Previous by thread: Newbie: How to understand Xcode's documentation
  • Next by thread: Re: Newbie: How to understand Xcode's documentation
  • Index(es):
    • Date
    • Thread