Key-Value Coding and Arrays


#1

I’m doing a project fro my CS 132 class and I’m having a problem with getting to a property I need.

I have an class called "Word"
I have 10 words of type “Word” each called word1,word2,word3,etc.
the “Word” class has 2 properties, wordType and userWord.
wordType is defined by me and will always stay the same, userWord is entered in a NSTableView by the user.
Both are strings.

I need to access the String value for the userWord property of each of the words.
the words(word1, word2, word3, etc.) are inside an NSMutableArray that was created/filled in the WindowControllerDidLoadNib method.

I thought that [word1 valueForKey:@“userWord”] would work but it doesn’t and neither does word1.userWord(this one actually says that word1 doesn’t exist)

If anyone can help that would be great! This is the last hump I have to get over for this project