Inconsistent Behavior of Lists

Scott Rossi scott at tactilemedia.com
Wed Sep 15 12:42:45 EDT 2004


Recently, Dan Shafer wrote:

> OK, I think I've uncovered an anomaly in the way Rev handles/parses
> list items that cost me about four hours of work last night. I want to
> confirm that: (a) I'm right; and (b) this is a bug before I go any
> further.
> 
> Here's a recipe that demonstrates the anomaly. Create a card with three
> fields and a button. Put this script into the button:
> 
> on mouseUp
>  put field 1 into list1
>  put field 2 into list2
>  put item 2 of list1 into temp
>  put item 2 of list2 into temp1
>  put temp && len(temp) into field 3
>  put return & temp1 && len(temp1) after field 3
> end mouseUp

Are you implying that the bug is in the length function?  Or the way Rev
evaluates an item chunk?

If you type 4 spaces into a field, the length function applied to that field
will return 4.  If you place a comma and 4 spaces in a field, and get the
number of characters of item 2 of the field, Rev will return 4.

Not sure what you're seeing as a bug.

Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list