lineoffset
Jim Ault
jimaultwins at yahoo.com
Fri Nov 6 15:05:22 EST 2009
On Nov 6, 2009, at 11:17 AM, Rick Rice wrote:
> I know there is something real easy I'm missing but;
>
> why doesn't this work?
>
> on mouseUp
> set itemdel to "|"
> get the clicktext
> put lineoffset (it, item 1 of cd field "storage")
> end mouseUp
Not knowing what is in the field, I will take a guess.
Try
set itemdel to "|"
put item 1 of cd field "storage" into testValue
breakpoint --now look at the string in testValue
Also
put lineoffset(it, item 1 of cd field "storage") --
-- no space after 'lineoffset'
Also remember that an 'item' is considered a smaller chunk than a
line, so that the following does not make sense to Rev
put line 2 of item 4 of field "storage"
What you would need to do to follow the rules is
set the lineDel to "|"
set the itemDel to cr
put item 2 of line 4 of field "storage"
-- now multiple visible lines in the field would be considered as
items for the purposes of chunk expressions.
By the way, cd field is not necessary in Rev, but works because of the
compatibility routines that allow much of Hypercard to work in Rev.
Hope this helps,
Jim Ault
Las Vegas
More information about the use-livecode
mailing list