Recursive Script

Bob Sneidar bobsneidar at iotecdigital.com
Mon Oct 17 11:02:33 EDT 2016


I don't recall if I thanked you for this. Thank you. 

Bob S


> On Oct 4, 2016, at 12:41 , Paul Dupuis <paul at researchware.com> wrote:
> 
> Here is an example:
> 
> function listDatagrids pObject
>  local dataGridList
>  repeat with i=1 to the number of groups of pObject
>    if grp i of pObject is a datagrid then -- fix this line
>      put whatever data on the datagrid & return after dataGridList --
> fix this line
>    else
>      put listDataGrids(long ID of grp i of pObject) into childList
>      if childList is not empty then put childList & return after
> dataGridList
>    end if
>  end repeat
>  return dataGridList
> end listDataGrids
> 
> there are 2 lines you need to fix - one is how to tell a grp is a
> datagrid. I recall a property or API you can check, but didn't have the
> datagrid PDF handy.
> The other is whatever info (short name, long ID, etc. you want for each
> datagrid
> 
> Call it with the long id of the card. As in:
> 
> put listDatagrids(long id of cd x of stack y) into myListOfDatagrids
> 





More information about the use-livecode mailing list