• 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: Number formatters, validateValueForKey & dirty editing contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Number formatters, validateValueForKey & dirty editing contexts


  • Subject: Re: Number formatters, validateValueForKey & dirty editing contexts
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 01 Dec 2003 21:42:29 -0800

Hi Anthony,

At 06:54 PM 01/12/2003 -0500, Anthony Paras wrote:
>I'm using WO 5.1.
>
>I noticed that when you have a WOTextField bound to a Number and not a
>BigDecimal, a numberformatter on that WOTextField will cause the editing
>context to get dirty during the RR loop.
>
Meaning ec.hasChanges() == true?

Does it send changes to the database if saved?


>The validateValueForKey that happens during the RR loop is supposed to check
>if values are the same and not update them if they are not,
>
Is that documented?  I'm pretty sure that is what it has always done, but I
don't recall seeing it promised in writing.


>but it fails in
>this case.  I am assuming that the formatter creates a BigDecimal, and they
>are using equals() instead of insuring that  both values are BigDecimals and
>using compareTo().
>
>This is very annoying and I think it's a bug.  Anyone else have an opinion
>on this?
>
If it works for all the other cases (and I recall that it does) and only
fails in this specific case then I would have to say it is a bug.  I would
be surprised to see this.  However; you might have trouble getting Apple to
agree if it is not documented to be so.

As a hack around you could add (generated) code to the set methods in EOs
to not call super if the values are equivalent.


Chuck





--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
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: 
 >Number formatters, validateValueForKey & dirty editing contexts (From: Anthony Paras <email@hidden>)

  • Prev by Date: Re: Developing on Panther, deploying on Jaguar. OK?
  • Next by Date: Re: Reportmill and WO with Xcode?
  • Previous by thread: Number formatters, validateValueForKey & dirty editing contexts
  • Next by thread: cvs in xcode and packages (.eomodel, .wo,...)
  • Index(es):
    • Date
    • Thread