attaching my group id to a control in a subgroup

Dr. Hawkins dochawk at
Tue Aug 22 18:08:21 EDT 2017

I have a uniqDna value for each datum in my data.  This is used to store
and retrieve it from a database.

When I create an output group for one of these (and there are a great many
different output groups), the group is labeled with these IDs.

The output group will typically contain label fields and graphics, but gets
its unDna set to the corresponding uniqDna.  It also contains fields for

When an output field is modified, the handler calls the seal routine,
passing the field name, new value, and the unDna.

I had made, for performance reasons, the strong assumption that the output
fields would always be a top level member of the output group.  I also
designed output groups which, for organizational reasons, group the output
fields . . . oops . . .

The closeField handler follows the rule, and assumes that the unDna of the
owner of the target is the uniqDna value it needs.  This backfires when not
true :(

One obvious solution would be to simply ungroup the offending groups--but
there are good reasons to want it have subgroups (such as sharing subgroups
for maintenance of similar outputs with shared elements).

At the moment, the three possibilities I see are,
1) recurse upwards until a group with a unDna is found (well, close; there
are universal fields with no unDna)
2) check the owner of the owner of the target
3) redundantly set the uDna of every output field at group creation/copying

I need this to be blindingly fast, too (although I doubt that this is a
problem in 2017).

Am I missing an obvious way to do this?
Dr. Richard E. Hawkins, Esq.
(702) 508-8462

More information about the Use-livecode mailing list