What makes a line a line in a chunk expression?

Len Morgan len-morgan at crcom.net
Mon Sep 7 01:31:48 EDT 2009


I wish it was that simple but if that DOES turn out to be the problem, 
there's something not quite right with Rev itself.  From an earlier 
post, I am comparing the pChoice that is passed by the menuPick handler 
with "the text of button "taskBar"" which is the button that sent me the 
pChoice in the first place so they should both be getting their data 
from the same object and should therefore be the same.

That is of course, unless the menuPick parameter is not a "true" line 
but I would think I'd get a "chunk types don't match" message or 
something like that.

This seems like a very simple thing but it's giving me fits!

len morgan

J. Landman Gay wrote:
> Len Morgan wrote:
>> If I type the lines:
>>
>> put "Movement History" into myChoice
>> put the text of button "taskBar" into tLines
>> put (myChoice is among the lines of tLines)
>>
>> into the message box, the result I get is "false"
>
> When you use "is among", the entire line must match to get a hit. If 
> the line you are trying to match has any extra characters (maybe 
> "Movement History for Dummies") then the result is false. The two 
> strings must be identical.
>
> If you are trying to match only the beginnings of lines, try something 
> like this:
>
>  if offset(cr & myChoice, cr & tLines) > 0 then...
>



More information about the use-livecode mailing list