• 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
How to locate coding examples for specified commands [Newbie]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to locate coding examples for specified commands [Newbie]


  • Subject: How to locate coding examples for specified commands [Newbie]
  • From: Phil Faber <email@hidden>
  • Date: Sat, 26 Jul 2008 09:49:24 +0100

Can anyone direct me to an on-line resource that includes examples of how to use specific Cocoa commands? (Are things like - (NSString *)capitalizedString called 'commands' or should I call them something else?) It's often so much easier to understand how it works by seeing an example.

I would like, for example, to see that

- (NSString *)capitalizedString

..is available for use and that an example of its use might be:

[textField1 setStringValue:[[textField2 stringValue] capitalizedString]];


or
NSString *string = @"tHe uniVERSity of TEXAS"; NSString *capstring = [string capitalizedString];

(The above example I found at http://www.macdevcenter.com/pub/a/mac/2001/07/13/cocoa.html?page=last&x-order=date&x-maxdepth=0 after a brief trawl)



I realise I can Google 'capitalizedString' and start going through the 917 results to see which links contain examples and then try to extract the example that are Cocoa but this seems a very slow and cumbersome way of finding the answer - especially if I have to do it for every single command I'm trying to study.


For example, these from Google are (presumably!) not Cocoa:
set contents of text field "inputField" of window "myWindow" to call method "capitalizedString" of (contents of text field "inputField" of window "myWindow"
myString.capitalizedString()
pbString := pbString capitalizedString.
etc.
If someone can recommend a searchable resource, the first thing I'll be looking up is stringWithContentsOfFile:encoding:error: (I would have used this as an example above but can't find an example of its usage!)
_______________________________________________


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: How to locate coding examples for specified commands [Newbie]
      • From: "Shawn Erickson" <email@hidden>
    • Re: How to locate coding examples for specified commands [Newbie]
      • From: "Shawn Erickson" <email@hidden>
    • Re: How to locate coding examples for specified commands [Newbie]
      • From: Omar Qazi <email@hidden>
  • Prev by Date: Re: Getting process table info from within a Cocoa app
  • Next by Date: Re: NSSpeechSynthesizer delegate method not called in OCUint
  • Previous by thread: Re: Getting process table info from within a Cocoa app
  • Next by thread: Re: How to locate coding examples for specified commands [Newbie]
  • Index(es):
    • Date
    • Thread