Datagrid Discrimination

zryip theSlug zryip.theslug at gmail.com
Fri Mar 14 21:01:25 EDT 2014


Bob,

Use the "control type" property of the datagrid:

if (the dgProp["control Type"] of grp theGroupName is "Data Grid") then
    doSomething
end if




Best Regards,

On Sat, Mar 15, 2014 at 1:45 AM, Bob Sneidar
<bobsneidar at iotecdigital.com> wrote:
> I am trying to determine if a group is a data grid. I tested earlier with a regular group of objects using this statement:
>
> put (the dgProp ["allow editing"] of group theGroupName is not empty) into isDataGrid
>
> It returned false for non-datagrid groups and true for data grid groups, since that dgprop must always return true or false. I thought I was being quite clever.
>
> NOW it is returning true for non-datagrid groups! Is there a simple way to test whether or not a gout is a data grid? I know this has been asked before, but I'm not sure the answers were comprehensive. I could check to see if it had a parent script, but then any group with a parent script that was not a data grid would pass that test.
>
> Is there a property that data grids possess that no other group possesses that I can use?
>
> Bob
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Zryip TheSlug
http://www.aslugontheroad.com




More information about the use-livecode mailing list