• 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: Marek Wawrzyczny <email@hidden>
  • Date: Wed, 14 Apr 2004 09:32:18 +1000

Hi Randall,

The simple way. Given that you have created java classes for your entities in your EOModel and that on the WOComponent page you have:

1) An NSArray containing CustView objects
2) A CustView iterator variable
3) A WORepetition with the following bindings:
  a) list bound to the NSArray
  b) item bound to the CustView iterator

Now, within the bounds of the WORepetition element you can can reference the CustView iterator to display information about the CustView object. You hardly have to write any logic in the WOComponent class.

On 14/04/2004, at 06:29, Randall Perry wrote:

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.

I'm not exactly sure what you want to do, but certainly you can
directly access an object property within an array of objects within
one or two lines of code.

Can this be condensed into one line?
     CustView eo = (CustView) CustInfo.objectAtIndex(0);
     String cust =  eo.cust();


-- Randall Perry sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

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




Marek Wawrzyczny

software engineer
-------------------------->
ish group pty ltd
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400
http www.ish.com.au | email email@hidden
_______________________________________________
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: warning message after upgrade to Panther, XCode, WO5.2.3
  • Next by Date: RE: warning message after upgrade to Panther, XCode, WO5.2.3
  • Previous by thread: Re: Accessing single element from NSArray of objects
  • Next by thread: Re: Accessing single element from NSArray of objects
  • Index(es):
    • Date
    • Thread