Re: Using instance variable from NSArray of objects
Re: Using instance variable from NSArray of objects
- Subject: Re: Using instance variable from NSArray of objects
- From: Andreas Mayer <email@hidden>
- Date: Fri, 9 Dec 2005 22:28:46 +0100
Am 09.12.2005 um 21:45 Uhr schrieb Steve Gran:
I don't really "get" the concept of how to get back instance
variables of an object when the object is in an array.
You'll have to get the object out of the array first.
(Or, if you are using bindings, you would use an NSArrayController to
access the objects inside the array.)
I change the the line to
[returnedPrice setIntValue: [[theObjectINeed
valueForKey:@"priceOfCar"] intValue]];
Try
[returnedPrice setIntValue: [[[theObjectINeed objectAtindex:0]
valueForKey:@"priceOfCar"] intValue]];
('theObjectINeed' is not a good variable name, really. I'd make that
'filteredArray' or some such.)
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden