Getting The Name Of the Stock


#1

So, in the challenges and the examples the others have posted, nobody is returning the name of the stock.

I want to set and get or use the array reference, seems easy enough.

I tried unsuccessfully to add the name to the class as an NSString, but that generated a slew of errors. After searching online for awhile, I don’t really see any consistency in doing this.

I hope it is later in the book, and I hope I didn’t miss it earlier. Any hints, I’d rather have a hint than being told. It’s how I learn.

Incidentally, the example for the person in previous chapter gets the ID as an integer, and there has to be a way to get an employee name, so I know I’m not searching for too much out of the ordinary … I hope. The Grocery list is adding using addObject to the array, when I tried that, error as well.

This is the first snag I hit in the book.


#2

Ha, looks like it is discussed in next chapter.


#3

I was wondering the same thing, and I ended up using the employee ID trick to give the stocks ID numbers. I thought it was kind of strange to have your output without an identifier.

I guess a little bit at a time, and good to know it’s coming up in the next section.