• 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: 5.2.3 Boolean Bugs?????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 5.2.3 Boolean Bugs?????


  • Subject: Re: 5.2.3 Boolean Bugs?????
  • From: Anthony Paras <email@hidden>
  • Date: Thu, 18 Mar 2004 19:49:28 -0500

On 3/18/04 4:12 PM, "Jonathan Rochkind" <email@hidden> wrote:

> I've said it before, and I'll say it again now:  My conclusion is do
> NOT model boolean attributes at all. I think you're in for all sorts

That's been my approach too.  Lately, I came up with this helper class
method that does exactly what I want -- no more, no less:

public static boolean booleanValue(Number number) {
    if (number == null) {
        throw new RuntimeException("The number NULL could not be converted
to a boolean");
    }
    if (number.intValue() == 1) {
        return true;
    }
    if (number.intValue() == 0) {
        return false;
    }
    throw new RuntimeException("The number " + number + " could not be
converted to a boolean");
}
_______________________________________________
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: 5.2.3 Boolean Bugs????? (From: Jonathan Rochkind <email@hidden>)

  • Prev by Date: Re: refreshesRefetchedObjects significant hit on efficiency
  • Next by Date: Re: Query results in HTML
  • Previous by thread: Re: 5.2.3 Boolean Bugs?????
  • Next by thread: Re: 5.2.3 Boolean Bugs?????
  • Index(es):
    • Date
    • Thread