Re: WOConditional Question

2007-01-02 Thread shaun
Chuck Hill wrote: That is generally how it is done. We have a KeyValueConditional in our frameworks or in the PracticalWebObjects code that has bindings like: Foo: KeyValueConditional { key = someKey; value = someValue; negate = false; } Where the condition evaluates to true if

Re: WOConditional Question

2007-01-02 Thread Quattromultimedia
Sorry I didn't read well the question in this case you can do this: public boolean displayContent(){ return myMethodThatReturnsAValue().intValue() == 4; } david On 2 janv. 07, at 22:00, Quattromultimedia wrote: bind directly your object or your Number or your int to the condition

Re: WOConditional Question

2007-01-02 Thread Chuck Hill
That is generally how it is done. We have a KeyValueConditional in our frameworks or in the PracticalWebObjects code that has bindings like: Foo: KeyValueConditional { key = someKey; value = someValue; negate = false; } Where the condition evaluates to true if key.equals(value).

Re: WOConditional Question

2007-01-02 Thread Quattromultimedia
bind directly your object or your Number or your int to the condition. If the object is superior to zero (int, Number) or null (value). it is interpreted as true by the WOConditional. It works also with NSArrays, @count, Strings any binded value that is not null is interpreted as TRUE.

Re: WOConditional Question

2007-01-02 Thread Markus Lux
Hi Chip, you can't do this with a WOConditional. You can use a WOConditional only for checking booleans or null values (if the given condition is null, then no content is displayed). You need to write a method that checks that for you and returns a boolean value. Greetings, Markus 2007/1/2, Chi

WOConditional Question

2007-01-02 Thread Chip Myers
This question is in regards to the condition attribute within a WOConditional. How do I perform a simple check on an integer, to see if it equals a certain number? In this case, I only want the contents of the WOConditional to be displayed when this integer equals 4. Any help offered would be