V4MD - <null> results with lingo

Giacomo Vernoni giacomo at way-out.it
Mon Jul 16 09:16:28 CDT 2007


Hi Bart,
I already tried with VoidP but it doesn't work.
To explain (note that the field fld_mytext is empty):

put VoidP(vcursor.field("fld_mytext").value)

-- 0

<null> isn't recognised by VoidP. It only works if you "manually"  
check if it is void.

If you'd like to have some more information, you can read the  
comments on the VOID page on Adobe livedocs for Director MX 2004:

http://livedocs.adobe.com/director/mx2004/release_update_en/wwhelp/ 
wwhimpl/common/html/wwhelp.htm? 
context=Director_MX_2004_Documentation&file=05_con13.htm

For now, my solution is still the shortest (1 line for the result and  
1 line for the "bug bypass" code)...

I think we have a bug in V4MD...

Thanks anyway!

Giacomo



On 16 lug 2007, at 15:57, Bart Pietercil wrote:

> Hi Giacomo,
>
> what is wrong with using
>
> if VoidP(vcursor.field("fld_mytext").value) then
> 	mytext = ""
> else
> 	mytext = vcursor.field("fld_mytext").getstring()
> end if
>
> It looks as if that is what you are trying to obtain ?
>
> hth
>
> Bart
>
>
> On 16-jul-07, at 15:46, Giacomo Vernoni wrote:
>
>> Hi all,
>> I'm converting a huge project from V4MD 1.11 to 3.0. Director MX  
>> 2004 on Mac OS X 10.4.10.
>>
>> On v1.11 a text field returned an empty string as a result; now  
>> I'm getting a <null> result.
>> That's fine for me, but <null> is nothing lingo can handle. (Note:  
>> lingo not javascript).
>>
>> Example:
>>
>> myText = vcursor.field("fld_mytext").value
>> put myText
>>
>> -- <null>
>>
>> I really need an empty string, so I tried with getstring():
>>
>> myText = vcursor.field("fld_mytext").getstring()
>> put myText
>>
>> -- "<null>"
>>
>> I made some tests and I found that the only solution is to check  
>> if the result is void:
>>
>> myText = vcursor.field("fld_mytext").value
>> if myText = void then myText = ""
>> put myText
>>
>> -- ""
>>
>> I think that the field should return <void> in lingo and null in  
>> javascript... is this possible?
>> Is there a way to get an empty string from an empty or null field?
>>
>> Thanks,
>>
>> Giacomo Vernoni
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>


More information about the Valentina mailing list