Skip navigation.
 
mlRe: NSEnumerator -> NSPopupButton
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

Related mailsAuthorDate
mlNSPipe / NSTask ls -> Array toppi Jul 16, 04:33
mlRe: NSPipe / NSTask ls -> Array Prachi Gauriar Jul 16, 04:58
mlRe: NSPipe / NSTask ls -> Array Jerry Krinock Jul 16, 07:05
mlRe: NSPipe / NSTask ls -> Array toppi Jul 16, 11:06
mlRe: NSPipe / NSTask ls -> Array Andrew Farmer Jul 16, 11:18
mlRe: NSPipe / NSTask ls -> Array Shawn Erickson Jul 16, 12:22
mlNSEnumerator -> NSPopupButton (was: Re: NSPipe / NSTask ls -> Array) toppi Jul 16, 12:35
mlRe: NSEnumerator -> NSPopupButton (was: Re: NSPipe / NSTask ls -> Array) Andrew Farmer Jul 16, 13:44
mlRe: NSEnumerator -> NSPopupButton (was: Re: NSPipe / NSTask ls -> Array) Prachi Gauriar Jul 16, 16:55
mlRe: NSPipe / NSTask ls -> Array Jerry Krinock Jul 16, 17:52
mlRe: NSPipe / NSTask ls -> Array James Bucanek Jul 16, 18:04
mlRe: Re: NSEnumerator -> NSPopupButton (was: Re: NSPipe / NSTask ls -> Array) Michael Ash Jul 16, 21:48
mlRe: NSEnumerator -> NSPopupButton toppi Jul 17, 00:12
mlRe: NSPipe / NSTask ls -> Array Jeffrey J Barbose Jul 17, 04:43