• 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: initiate content of NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initiate content of NSArray


  • Subject: Re: initiate content of NSArray
  • From: Art Isbell <email@hidden>
  • Date: Tue, 22 Jun 2004 17:29:04 -1000

On Jun 22, 2004, at 3:48 PM, Goh Keng Boon wrote:

Hi can you explain in detail how to do that?

I've already fetch all content into an NSArray and bind this array to List of WORepetition, i need to set value for one of the attribute inside that NSArray(for every record),
so i'm not sure how to set that? Am i going to loop through the NSArray to set them record by record?

On 22-Jun-04, at 11:52 PM, wojingo wrote:

I think you could use awakeFromFetch(called for you when fetched from
DB:)

If you're always going to set the value of one or more attributes of each object fetched, as wojingo suggested, implement awakeFromFetch() in the EO class to set the value of one or more attributes. This will occur automatically as each object is fetched. Don't forget to send super an awakeFromFetch() message.


If you won't always set attribute values as each object is fetched, then you'll need to iterate through each object in the array. WORepetition is already iterating through the array, so if you implement anInvoiceItem()/setAnInvoiceItem(), you can set the values of each attribute in setAnInvoiceItem() which WORepetition will invoke for each object in the array.

	So the approach you choose depends on what you need to do.

Aloha,
Art
_______________________________________________
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: initiate content of NSArray
      • From: "shaun" <email@hidden>
References: 
 >initiate content of NSArray (From: Goh Keng Boon <email@hidden>)
 >Re: initiate content of NSArray (From: wojingo <email@hidden>)
 >Re: initiate content of NSArray (From: Goh Keng Boon <email@hidden>)

  • Prev by Date: Download of Database Into MS Excel File - How?
  • Next by Date: Re: initiate content of NSArray
  • Previous by thread: Re: initiate content of NSArray
  • Next by thread: Re: initiate content of NSArray
  • Index(es):
    • Date
    • Thread