• 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: Prototype mutableArray savechanges error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prototype mutableArray savechanges error


  • Subject: Re: Prototype mutableArray savechanges error
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 27 May 2009 13:42:08 -0700


On May 27, 2009, at 12:49 PM, Anjo Krank wrote:


Am 27.05.2009 um 21:40 schrieb Chuck Hill:

Anjo had some way of using this safely, but you need to be aware that EOF is NOT expecting the contents of that array to change.

Huh? Me? What?

You scolded me last time I said to not use mutable attributes and grumbled about the mutable prototype in Wonder being dangerous. Some non-sense like:


But apart from that, as most have said by now: using ERXMutableArray as an attribute value is totally ok, only using the mutable part of the API of the array is not. I.e. don't use addObject(), create a clone, add to that and setFoo() it.

What is the point of making a mutable attribute if you can't use it as a mutable value? It just positively BEGS to be misused. This whole thread is evidence of that. There is no additional complication that I can see in using an immutable array:


public void addBar(Bar bar) {
	setFoo(foo().mutableClone().addObject(bar));
}

public void addBar(Bar bar) {
	setFoo(foo().arrayByAddingObject(bar));
}

But you had some reason for wanting it to be a mutable instance. Some performance concern perhaps?


Chuck


No idea where the stack overflow comes from. Setting an exception breakpoint may or may not help...

Cheers, Anjo


--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Prototype mutableArray savechanges error
      • From: Mike Schrag <email@hidden>
References: 
 >Prototype mutableArray savechanges error (From: Frank Stock <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Chuck Hill <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Frank Stock <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Chuck Hill <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Frank Stock <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Chuck Hill <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Frank Stock <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Chuck Hill <email@hidden>)
 >Re: Prototype mutableArray savechanges error (From: Anjo Krank <email@hidden>)

  • Prev by Date: Re: lock operation locked more than one row issue!
  • Next by Date: Re: Prototype mutableArray savechanges error
  • Previous by thread: Re: Prototype mutableArray savechanges error
  • Next by thread: Re: Prototype mutableArray savechanges error
  • Index(es):
    • Date
    • Thread