I don't understand, how do you distinguish in this case between
nothing matching the xpath expression,  and the string "null" being
the value of the attribute? Shouldn't the datatype coercion code be
making a special
case for where there is not an actual match?

Actually, the real question is maybe why did the ontext event get
fired in the first place? I guess the $path
constraint gets evaluated once when it is initialized? There really
ought not to be a match there because the
dataset, "surveydataset" has not actually been loaded yet.

On Mon, Jul 14, 2008 at 1:41 PM, Max Carlson <[EMAIL PROTECTED]> wrote:
> You should be able to use 'null' instead.  That seems like the most sensible
> mapping to a string...
>
> Henry Minsky wrote:
>>
>> The reason the alert box comes up is that it has an "ontext" handler,
>> which says
>>
>>    <myalert title="Error"
>>             id="errors"
>>             text="$path{ '/response/@status' }"
>>             datapath="surveydataset:/">
>>        <handler name="ontext">
>>            <![CDATA[
>>            if ( this.text != null && this.text != 'ok' ){
>>                this.open();
>>            }
>>            ]]>
>>        </handler>
>>    </myalert>
>>
>> And the text that comes in is the string "null". So is this an example
>> of the data type coercion that Max just put in?
>>
>> If so, we need to figure out how to tell the datapath matching code
>> about what null means in a String data type ?
>>
>> On Mon, Jul 14, 2008 at 12:12 PM, Henry Minsky
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> When I run the vacation-survey demo, it comes up with a "Error" dialog
>>> box when the app starts up. Clicking OK,the app
>>> proceeds to run correctly, although the first time I ran it, the
>>> histogram bars showed up as just a few pixels wide. Then it
>>> got better...
>>>
>>> Something funny is going on ....
>>>
>>>
>>>
>>> --
>>> Henry Minsky
>>> Software Architect
>>> [EMAIL PROTECTED]
>>>
>>
>>
>>
>
> --
> Regards,
> Max Carlson
> OpenLaszlo.org
>



-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to