Datagrid Row Selection
Michael Doub
mike at doub.com
Wed Nov 30 06:15:28 EST 2011
What is the proper way to detect a row selection on a datagrid on IOS when a scroller is being used?
I currently am using the scroller script from the DGH and the following handler in the data grid behaviour script:
on Mouseup pMouseBtnNum
if pMouseBtnNum is 1 then
put the dgClickIndex of me into tIndex
get the dgVScroll of group "Contacts"
set the pVScroll of this card to it
get GetDataofIndex(tIndex,"RecID")
set the pRecID of Card "Action" to it
go to card "Action"
end if
end Mouseup
This seems to work reliably on the mac, but in the simulator and on the device I get the proper
scrolling and selection behaviour but with a occasional data grid failure where the grid seems frozen with only a few of the
rows redrawn. This happens when scrolling.
I suspect there is an interaction with the selection logic as when this handler is removed scrolling works as expected.
-= Mike
More information about the use-livecode
mailing list