• 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: BigDecimal vs WOConditional
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BigDecimal vs WOConditional


  • Subject: Re: BigDecimal vs WOConditional
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 17 Feb 2009 15:21:46 -0500

Actually, this is not (or, more precisely, SHOULD not) be a WOConditional trait; the very same behaviour should be used for all .wod boolean bindings which contain a number object (say, for a WOHyperlink "disabled" binding, and for WOString "escapeHTML" binding, yadda yadda yadda...).
it's WOAssociation.booleanValueInComponent, but not every component uses this ... the implementation is:

instanceof Number = false if intValue() == 0, true otherwise
else instanceof String = false if ("no", "false", "nil", "null"), if the String is the String form of a number (0-9+.-), false if parseInt(..) == 0, true otherwise
else instanceof Boolean = boolean value
else not null = true
else null = false


If each of them does this for itself (and potentially in a different way than all the others), then the thing is much worse disaster I've thought :(
I suspect most of WO core uses this ... Wonder has a mix where some use ERXValueUtilities, which has a broader interpretation.

ms

_______________________________________________
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


References: 
 >BigDecimal vs WOConditional (From: Ondřej Čada <email@hidden>)
 >Re: BigDecimal vs WOConditional (From: Stamenkovic Florijan <email@hidden>)
 >Re: BigDecimal vs WOConditional (From: Ondřej Čada <email@hidden>)
 >Re: BigDecimal vs WOConditional (From: Hugi Thordarson <email@hidden>)
 >Re: BigDecimal vs WOConditional (From: Ondřej Čada <email@hidden>)

  • Prev by Date: Re: BigDecimal vs WOConditional
  • Next by Date: Re: BigDecimal vs WOConditional
  • Previous by thread: Re: BigDecimal vs WOConditional
  • Next by thread: Re: BigDecimal vs WOConditional
  • Index(es):
    • Date
    • Thread