V4MD - <null> results with lingo

Bart Pietercil bart.pietercil at gmail.com
Mon Jul 16 08:57:59 CDT 2007


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



More information about the Valentina mailing list