How do I Create a Custom Property, part 19,214,651

David Burgun dburgun at dsl.pipex.com
Wed Apr 21 14:23:45 EDT 2004


>Hi David,
>
>>>>Here is sample code to demonstrate:
>>>>
>>>>on mouseUp
>>>>   put empty into myLineList
>>>>
>>>>   put myLineList & "Line1" & return into myLineList
>>>>   put the number of lines in myLineList into myLineCount
>>>>
>>>>   put myLineList & "Line2" & return into myLineList
>>>>   put the number of lines in myLineList into myLineCount
>>>>
>>>>   put myLineList & "Line1" & return into myLineList
>>>>   put the number of lines in myLineList into myLineCount
>>>>
>>>>   if line 1 of myLineList = line 3 of myLineList then
>>>>     beep
>>>>   end if
>>>>end mouseUp
>>>
>>>Will beep and have 3 (?) in myLineCount...
>>
>>Yes!
>>
>>>This is very strange!!!
>>
>>To you maybe, but to me it's as it should be!
>>
>>>I put myLineList into a field and set its listbehaviour to true...
>>>
>>>Guess what!
>>>You can select an empty line 4!!!
>>
>>If this isn't the desired action, then just strip off the 
>>terminating CR of the last line in the FIELD.
>
>Go figure :-D
>
>>Seems way better to just do the test once when moving into a field 
>>rather than every time you need to append a line to the list.
>>
>>However, this seems buggy to me. If the line count is returned as 
>>3, then 3 lines should be transfered, no?
>
>But how comes the empty line 4 into play???
>
>The linecount is 3 but there are (proven) 4 lines in the field???

Well to me there are 3 lines in the LIST (not sure what is the the 
field) and as most of what I've tested in RR seems to work and return 
a line count of 3, so it seems to me that the place to change it is 
in a *field*, not in a "Line List".

What happens if you ask for the number of lines in the *field*, does 
it return 3 or 4?

What happens if you put the (unchanged) field back into a new 
"LineList" and ask for the line count?

>P.S.
>I live in germany...
>Where do you live?
>
>I will get this info!
>Even if this will be the last action in my life... ;-)

Sorry, I didn't think you *really* wanted to know. I live in Lonodn, UK!

And I sincerly hope it isn't your last action!

All the Best and Thanks for your help! Email can be a pain to get 
your point across!
Dave



More information about the use-livecode mailing list