Re: Accessing single element from NSArray of objects
Re: Accessing single element from NSArray of objects
- Subject: Re: Accessing single element from NSArray of objects
- From: Arturo PĂ©rez <email@hidden>
- Date: Tue, 13 Apr 2004 15:22:27 -0400
On Apr 13, 2004, at 2:51 PM, Randall Perry wrote:
public String getCust()
{
EOEnterpriseObject eo = (EOEnterpriseObject)
CustInfo.objectAtIndex(0);
String value = eo.cust();
return value;
}
When I compile I get the error "Cannot resolve symbol: method cust()"
I also tried:
String value = eo.cust;
And got similar error.
KeyValue coding, man. Unless you have that method (it seems not) then
you have to
String s = (String)eo.valueForKey("cust");
So there's no shorthand to directly access an object property within an
array of objects? I can do it in one line in perl, php.
Yeah, and think of all the things you can't do at all :-)
----
WO in philadelphia - wanna cheesesteak with that?
Please visit webobjects.meetup.com.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.