Datagrids and Nested Behaviors
Bernd.Niggemann at uni-wh.de
Mon Jul 23 14:23:59 EDT 2018
The problem Bob Sneidar ran into by changing the order of the behaviors of a dataGrid is due to the initialization process of the dataGrid at start-up.
The behavior looks for a resourceStack by means of this handler.
private function _ResourceStack
local theStack, theCharNo
put the behavior of me into theStack
if theStack is not empty then
put offset(" of stack", theStack) into theCharNo <-- looks only at first behavior which is in Bob's case the wrong stack
delete char 1 to (theCharNo + 3) of theStack
In Bob's case the function returns the stack the button his newly assembled behavior is placed on instead of stack "revdatagridlibrary.rev".
Then the initialization trys to set again behaviors of specific elements of the datagrid to scripts of the "correct" _ResourceStack.
This fails obviously and is the reason for Bob's approach to fail.
Further details of this on request, I don't want to bother the list with them.
Richard Gaskin wrote:
The more I've explored this the more subclassing by inserting a custom behavior in between a custom control and its original behavior should work. It's curious that it doesn't here.
What exactly were the errors you encountered?
More information about the Use-livecode