How to locate coding examples for specified commands [Newbie]
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=lastx-order=datex-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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to locate coding examples for specified commands [Newbie]
On Jul 26, 2008, at 1:49 AM, Phil Faber wrote: Can anyone direct me to an on-line resource that includes examples of how to use specific Cocoa commands? http://www.cocoadev.com/ is a good one. (Are things like - (NSString *)capitalizedString called 'commands' or should I call them something else?) Methods. It's often so much easier to understand how it works by seeing an example. Of course. Good luck getting started. Omar Qazi Hello, Galaxy! 1.310.294.1593 smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to locate coding examples for specified commands [Newbie]
On Sat, Jul 26, 2008 at 1:49 AM, Phil Faber [EMAIL PROTECTED] wrote: Can anyone direct me to an on-line resource that includes examples of how to use specific Cocoa commands? I assume you have looked at Apple extensive API and conceptual documentation? The are available directly in Xcode either via Help menu - Documentation or in addition via the research assistant in Xcode 3.x. The are also available online at Apple Developer Connection... http://developer.apple.com/referencelibrary/Cocoa/index.html If you haven't make sure to read the Cocoa Fundamentals conceptual documentation (and the docs it references)... http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals It looks like you should review the Objective-C language documentation given your question should I call them commands, etc. http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to locate coding examples for specified commands [Newbie]
On Sat, Jul 26, 2008 at 1:49 AM, Phil Faber [EMAIL PROTECTED] wrote: 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!) google stringWithContentsOfFile:encoding:error: site:developer.apple.com ...or... simply search using the documentation window in Xcode. http://developer.apple.com/documentation/Cocoa/Conceptual/Strings/Articles/readingFiles.html -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to locate coding examples for specified commands [Newbie]
Phil, I'd add Google Code Search to the aforementioned. http://www.google.com/codesearch In its advanced mode you can stipulate that the match must be in Objective-C. Joel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]