FROM : toppi
DATE : Mon Jul 17 00:12:53 2006
Dear Prachi,
> A couple of things. First, you're sending NSPopUpButton the
> addItemWithTitle: message instead of an instance of NSPopUpButton. You
> need to be sure you're sending messages to objects, not their classes.
> What have you used to learn Cocoa so far?
I read "Programming in Cocoa" by Stephen G. Kochan and "Cocoa
Programming for Mac OS X (2nd Edition)" by Aaron Hillegass.
But i have to admit that your first sentence above helped me a lot more
in understanding the concept of objects and classes, than everything i
read before :-) i should print that out and glue it on my monitor!
> The Cocoa Fundamentals Guide
>
> <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/index.html>
>
> will probably be really helpful. In the navigation menu on the left
> side of the screen, be sure to look at The Objective-C Programming
> Language too.
Thanks for your hint. I'll have a look.
>
> Also, using an enumerator with an array is actually less efficient (and
> harder to understand, IMO) than just using a for loop like:
>
> unsigned ttyCount = [ttysArray count];
> for (unsigned i = 0; i < ttyCount; i++) {
> [ttyPopUpButton addItemWithTitle:[ttysArray objectAtIndex:i]];
> }
>
Thanks again, to Jerry and James, too!
This mailinglist is really a great benefit. I probably learned a bit
during the last two days.
/Dominik
DATE : Mon Jul 17 00:12:53 2006
Dear Prachi,
> A couple of things. First, you're sending NSPopUpButton the
> addItemWithTitle: message instead of an instance of NSPopUpButton. You
> need to be sure you're sending messages to objects, not their classes.
> What have you used to learn Cocoa so far?
I read "Programming in Cocoa" by Stephen G. Kochan and "Cocoa
Programming for Mac OS X (2nd Edition)" by Aaron Hillegass.
But i have to admit that your first sentence above helped me a lot more
in understanding the concept of objects and classes, than everything i
read before :-) i should print that out and glue it on my monitor!
> The Cocoa Fundamentals Guide
>
> <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/index.html>
>
> will probably be really helpful. In the navigation menu on the left
> side of the screen, be sure to look at The Objective-C Programming
> Language too.
Thanks for your hint. I'll have a look.
>
> Also, using an enumerator with an array is actually less efficient (and
> harder to understand, IMO) than just using a for loop like:
>
> unsigned ttyCount = [ttysArray count];
> for (unsigned i = 0; i < ttyCount; i++) {
> [ttyPopUpButton addItemWithTitle:[ttysArray objectAtIndex:i]];
> }
>
Thanks again, to Jerry and James, too!
This mailinglist is really a great benefit. I probably learned a bit
during the last two days.
/Dominik
| Related mails | Author | Date |
|---|---|---|
| toppi | Jul 16, 04:33 | |
| Prachi Gauriar | Jul 16, 04:58 | |
| Jerry Krinock | Jul 16, 07:05 | |
| toppi | Jul 16, 11:06 | |
| Andrew Farmer | Jul 16, 11:18 | |
| Shawn Erickson | Jul 16, 12:22 | |
| toppi | Jul 16, 12:35 | |
| Andrew Farmer | Jul 16, 13:44 | |
| Prachi Gauriar | Jul 16, 16:55 | |
| Jerry Krinock | Jul 16, 17:52 | |
| James Bucanek | Jul 16, 18:04 | |
| Michael Ash | Jul 16, 21:48 | |
| toppi | Jul 17, 00:12 | |
| Jeffrey J Barbose | Jul 17, 04:43 |






Cocoa mail archive

