• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing single element from NSArray of objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: Accessing single element from NSArray of objects (From: Randall Perry <email@hidden>)

  • Prev by Date: Re: Accessing single element from NSArray of objects
  • Next by Date: Re: What class generates the sql?
  • Previous by thread: Re: Accessing single element from NSArray of objects
  • Next by thread: WOActiveImage, Image Maps and Direct Actions
  • Index(es):
    • Date
    • Thread