How do I Create a Custom Property, part 666
Klaus Major
klaus at major-k.de
Wed Apr 21 13:43:11 EDT 2004
Hi David,
> Hi Klaus :-)
>
> Well I just tried it and it works just fine my way. Doing it the way
> you suggest just addes more lines of code to the script.
>
> 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...
This is very strange!!!
I put myLineList into a field and set its listbehaviour to true...
Guess what!
You can select an empty line 4!!!
> This avoids the if endif on EVERY append operation performed
> myLineList as discusseed earlier.
>
> To avoid the case where the last line does not have a terminator, you
> can do this:
>
> if the last character of the last line of myLineList is not return
> then
> put the last line of myLineList & return into the last line of
> myLineList
> end if
Or shorter:
if char -1 myLineList <> CR then
put CR after myLineList
end if
But i still don't get the point :-(
> ...
>> LINES are defined by the "linedelimiter" which is in fact the CR.
>>
>> If we decide (like you suggested) to use the CR as an itemdelimiter,
>> we would not be
>> able to differ "lines" anymore, because there is NO linedlimiter
>> anymore to differ them...
>> So we would have to define another linedelimiter first :-)
>>
>> And that would be the "END OF THE LINES" like we used to know, and
>> therefore not acceptable :-)
>
> I really don't understand what you mean, but as I say the above sample
> works just fine, so it's a moot point really!
As is said, this is probably a semantic problem ;-)
> ...
> But it works that way anyway!!!!!!!!!!!!! So by definition it's
> better!!!!!!!!!!!!
>
>> And maybe because i know that it is idle to question things that
>> won't change.
>> (...in the near and distance future... Just like the way the engine
>> handles lines)
>
> So do I, cos it handles them the way I expected them to be
> handled!!!!! No need to change anything.
Sorry, don't understand a word..
We are probably talking about the same thing, but from VERY different
angles...
Where did you say are you living? ;-)
> All the Best
> Dave
Regards
Klaus Major
klaus at major-k.de
www.major-k.de
More information about the use-livecode
mailing list