How to locate coding examples for specified commands [Newbie]
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