How to get the number of lines of a fld referenced by long ID in a variable.

J. Landman Gay jacque at hyperactivesw.com
Thu Jun 29 01:14:42 EDT 2017


On 6/28/17 9:25 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> on addSpaceBelowListLines pField,pSpace
>      put the number of lines of pField
> # returns 1 --
> # --  of course, that's a prop of the var, not the object it refes to
> 
>       repeat with x = 1 to (the number of lines of pField)
>            set the spacebelow of line x of pField to pSpace
>       end repeat
> end addSpaceBelowListLines
> 
> # only line 1 gets added space.


Try this, assuming pField is a long ID:

on addSpaceBelowListLines pField,pSpace
     set the spaceBelow of line 1 to -1 of pField to pSpace
end addSpaceBelowListLines


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list