Datagrid Row Selection

Michael Doub mike at doub.com
Wed Nov 30 13:02:00 EST 2011


I am experiencing another interesting behaviour.  As you can see in the code below I am trying to go to the card "Action". 
The card is displayed but neither the PreOpenCard or OpenCard handers are being invoked.  This is seen in the mac development environment.

Does any one have an idea as to what would cause this behaviour?

-= Mike


On 2011-11-30, at 6:15 AM, Michael Doub wrote:

> 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
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list