• 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 Perez <email@hidden>
  • Date: Tue, 13 Apr 2004 12:46:05 -0400

Randall Perry wrote:

I've got an NSArray var, custInfo, which fetches an array of objects via a
direct action:

  custInfo = ec.objectsWithFetchSpecification(fetchSpec);

It then loads a component page passing the array:

  ResultPage nextPage = (ResultPage) pageWithName("ResultPage");
  nextPage.takeValueForKey(custInfo, "CustInfo");
  return nextPage;

On ResultPage I can access a single element of all obj arrays by setting
it's value to a property:
    CustInfo.cust

But, how do I access a property of a single row? I tried this, but it throws
an exception:
    CustInfo[0].cust


Are you familiar with WORepetition? Alternatively, you may want to investigate the use of WODisplayGroup.

I believe your first example above actually returns an array (NSArray) of that particular attribute. How are you displaying that?

-arturo
http://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.


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

  • Prev by Date: Accessing single element from NSArray of objects
  • Next by Date: Re: Accessing single element from NSArray of objects
  • Previous by thread: Accessing single element from NSArray of objects
  • Next by thread: Re: Accessing single element from NSArray of objects
  • Index(es):
    • Date
    • Thread