• 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: Booleans 5.2.3 The Good and Bad
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booleans 5.2.3 The Good and Bad


  • Subject: Re: Booleans 5.2.3 The Good and Bad
  • From: Robert Walker <email@hidden>
  • Date: Wed, 17 Mar 2004 11:13:14 -0500

I've been working with WO for several years now and have never used Boolean data type in my model. I've always used simple Integers to represent boolean values where 0 is false and 1 is true.

I'm just curious why you find it necessary to use the Boolean class in you model. Maybe there is a good reason for this, which is why I'm asking.

Using the Integer (Number) class works fine for checkboxes, WOConditionals and anything else I've tried in WOBuilder.

When I want a primitive boolean I just use something like:
boolean myBoolean = (myValue == new Integer(1));

On Mar 17, 2004, at 10:00 AM, James Cicenia wrote:

Hello -

I changed all my castings in my base classes to Boolean from Number.
The good is that I can use this Boolean directly in WOBuilder! Before
I had to create a shadow method isTrue, etc.

The Bad is I don't know how to generate my base classes automatically
anymore via EOGenerator and my EOModel. Seems like whatever I do
it always makes them Number.

-James Cicenia
_______________________________________________
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.



--
Sincerely,
Robert Walker
Programmer
Bennett Technology Group
_______________________________________________
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: 
 >Booleans 5.2.3 The Good and Bad (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: 5.2.3 Boolean Bugs?????
  • Next by Date: Re: 5.2.3 Boolean Bugs?????
  • Previous by thread: Booleans 5.2.3 The Good and Bad
  • Next by thread: test N/M
  • Index(es):
    • Date
    • Thread