Datagrids and Nested Behaviors
Richard Gaskin
ambassador at fourthworld.com
Fri Jul 20 16:26:32 EDT 2018
I just realized why the method most useful for controlling scope won't
actually work.
For scoping, we want only some DGs to have custom behavior, so this
would seem most desirable:
[ DataGrid ]
|
V
[ Custom Behavior ]
|
V
[ Standard DG Behavior ]
Useful as that it for limiting scope, the problem is that much of the DG
code refers to objects within "me", and in this setup "me" refers to the
Custom Behavior object rather than the original DG group. No subgroups,
fields, or anything else the DG expects to find are present in the
Custom Behavior object, resulting in script errors.
So the only way I can see this working at all is to toss scope control
out the door and swap the Custom Behavior to be the behavior object for
the Standard DG Behavior, as I believe Panos had suggested earlier.
Brian's suggestion of "before" and "after" handlers may help for some
aspects of message ordering, but all handlers in the Custom Behavior
object will affect all DGs once the Custom Behavior object is assigned
as the behavior for the global Standard DG Behavior.
At the risk of drifting toward OOPness, I wonder if this situation may
prompt us to consider some more refined method of having nested
controls, so that we can insert a custom behavior script in between a
global-scope behavior script and a subset of the controls it's assigned to.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list