Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bliblablo

macrumors newbie
Original poster
Oct 20, 2008
26
0
Hey

I have an entity which contains an attribute called "track" and it is a integer.
The attribute is bint to a tableview.
Now i have an ArrayController and in there i have a method named "openFile"
Everything works for strings:
Code:
id newObj = [super newObject];
[newObj setValue:@"Test" forKey:@"title"];
But with integers i have a problem:
This would be an invalid cast:
Code:
[newObj setValue:1 forKey:@"track"];
And this does't work eather:
Code:
[newObj setInteger:1 forKey:@"track"];

How can i assign my integer to that key called "track"???

Thx for helping,
greetings, BliBlaBlo
 

bliblablo

macrumors newbie
Original poster
Oct 20, 2008
26
0
Oh... this is the message i get when calling "openFile" with adding my value by doing:
Code:
[newObj setInteger:1 forKey:@"track"];

Code:
*** -[NSManagedObject setInteger:forKey:]: unrecognized selector sent to instance 0x19dcb0
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.