• 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: EOQualifier and boolean
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier and boolean


  • Subject: Re: EOQualifier and boolean
  • From: Ian Joyner <email@hidden>
  • Date: Mon, 4 Sep 2006 10:36:29 +1000

On 02/09/2006, at 3:04 PM, Joe Little wrote:

I saw this recently on the list, but for whatever reason my string
based qualifier isn't having an effect.

I have some values that are integer in the DB (1 or 0) -- and others
are boolean and appears as t or f in SQL results. Well, in my
qualifier format string, I have things like "and checkedValue = 1" and
that works. But "and checkedbooleanvalue = true" doesn't effectively
work, but no errors come of it.

Is there an obvious string based syntax that should work?

Have you simplified things for your post? 'checkedbooleanvalue = true' I think should be flagged as at least a warning by the compiler, since C-based languages have confused the equality operator with assignment. What I think you mean is 'checkedbooleanvalue == true', however the == true bit is superfluous. Rather than if (checkedbooleanvalue == true) just if (checkedbooleanvalue) is better stylistically.


If that's not the problem, what you describe should work. I use:

I use:

	static String true_string = "T";
	static String false_string = "F";

    public boolean is_a_doctor_button () {
        return is_a_doctor ().equals (true_string);
    }

    public void setIs_a_doctor_button (boolean value) {
		setIs_a_manager (value? true_string: false_string);
    }

Ian

_______________________________________________
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: 
 >EOQualifier and boolean (From: "Joe Little" <email@hidden>)

  • Prev by Date: Re: Deploying 5.3 on Linux
  • Next by Date: Cross EOModel relationships?
  • Previous by thread: Re: Re: EOQualifier and boolean
  • Next by thread: mdimension server reliability?
  • Index(es):
    • Date
    • Thread