NULL values not rendered as void in Director

Pierre Rossel prossel2 at myrealbox.com
Sun Sep 17 03:17:24 CDT 2006


Hello,

Valentina returns NULL values as <Null> in Director. This value is not valid
in Director's language and therefore we cannot do anything with it and have
to use workarounds to avoid those values.

I think NULL should be returned as <void> in V4MD.

Here is an example (pseudo code):

The condition is never true, so there is nothing to count. The result should
be a NULL value (void in Director)

Cursor = SqlSelect("SELECT count(myfield) FROM myTable WHERE 1 = 0")
Put cursor.field(1).value
-- 0                          <-- WRONG: should be void
Put cursor.getRecord()
-- [<Null>]                   <-- WRONG: should be [void]
Put cursor.getRecordsAsPropList()
-- [[#No_name1: <Null>]]      <-- WONG: should be [[#No_name1: void]]


The <Null> value in Director has very strange behaviors. Example:

put cursor.getRecord()[1] + 1
-- 1

put 1 + cursor.getRecord()[1]
-- 1065353216                   <-- shouldn't it be the same value as above
??

Definitely, V4MD should replace these <NULL> values by void.

Do you want me to put this into Mantis ?

Tested using V4MD 2.4.2 on Windows XP

Thank you.

Pierre Rossel



More information about the Valentina mailing list