Odd Empty behavior

Scott Rossi scott at tactilemedia.com
Tue Jul 1 16:10:04 EDT 2014


Hi Bill:

Over here, I get "not empty" using both 6.6.0 and 6.6.1.

I was going to mention something about being careful with arrays and
determining empty values, but it looks like the RunRev guys changed how
the engine "sees" the contents of arrays.  A quick test:

In LC 5.5:

put "XX" into theArray["data"]
answer theArray is empty -- RETURNS TRUE

In LC 6 & 7:

put "XX" into theArray["data"]
answer theArray is empty -- RETURNS FALSE



Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/1/14 11:58 AM, "William Prothero" <prothero at earthednet.org> wrote:

>Folks:
>LC 6.6.0, OSX 10.9.3
>I have the following script:
>
>   put "XX" into test["data"]["a1"]
>   if test["data"] is empty then
>      answer "It is empty"
>   else
>      answer "Not empty"
>   end if
>
>I would think that if there was some value in test[³data²], it would
>return ³Not empty². However, it returns empty. I think this is a very
>unexpected behavior because I think of the ³a1² value of test as a
>subarray, especially since test[³a1²] doesn¹t have the set value. In
>fact, test[³data²] is not empty. It contains the subarray [³a1²].
>
>Is this a bug or just a livecode oddity?
>
>Thanks,
>Bill
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list