• 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
Newbie: How to understand Xcode's documentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie: How to understand Xcode's documentation


  • Subject: Newbie: How to understand Xcode's documentation
  • From: Phil Faber <email@hidden>
  • Date: Tue, 15 Jul 2008 23:19:13 +0100

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


  • Follow-Ups:
    • Re: Newbie: How to understand Xcode's documentation
      • From: Jens Alfke <email@hidden>
    • Re: Newbie: How to understand Xcode's documentation
      • From: Graham Cox <email@hidden>
    • Re: Newbie: How to understand Xcode's documentation
      • From: Nick Zitzmann <email@hidden>
    • Re: Newbie: How to understand Xcode's documentation
      • From: "Dave DeLong" <email@hidden>
    • Re: Newbie: How to understand Xcode's documentation
      • From: "Jason Sallis" <email@hidden>
  • Prev by Date: Re: custom NSButtonCell behaves different/wrong on Leopard
  • Next by Date: Re: [Q] Any document that shows differences of Cocoa, programming for Mac and for the iPhone/iPod touch?
  • Previous by thread: Re: Duplicate rows appearing in outlineview after creating new Entity in moc, why?
  • Next by thread: Re: Newbie: How to understand Xcode's documentation
  • Index(es):
    • Date
    • Thread