the dgIndex of me, datagrids in LC 5.02

Klaus major-k klaus at major-k.de
Wed May 20 12:55:11 EDT 2020


Hi friends,

strange behavior here!?

I am working on a customers stack and have to use LC 5.02.

My customer has a big datagrid of type TABLE with a ComboBox
menu button in it. This column has of course a custom behavior.

Since "menupick" is not triggered inside of this custom behavior
I created a workaround and just call a handler in the behavior script
with the selected menuitem as a parameter.
Script of ComboBox:
---------------------------------
on menupick pChosenItem
 addmenudata pChosenItem
end menupick
---------------------------------

Works fine however I have big problems to get the DGINDEX of that column!?
So I used a MOUSEDOWN handler in the custom behavior:
-------------------------------------------------------------
local tLocalIndex

on mousedown
    ## DGMousedown or not, no difference...
    dgMouseDown
    put the dgIndex of me into tLocalIndex

    ## For testing
    put tLocalIndex
end mousedown

## More stuff here...
## ...
------------------------------------------------------------
However this does not stick, means sometimes tLocalIndex is just EMPTY
for no apparent reason and the exspected action/following scripts fails!?

Any hints very welcome!


Best

Klaus
--
Klaus Major
https://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list