Using the GetDataOfLine function out of the message path?

Bob Sneidar bobs at twft.com
Thu Dec 8 11:24:48 EST 2011


This presumes you "know" what the line should be. If you want the data from a selected line, use the dgHilitedLine(s) to get the line number(s), or as I always like to do, use dgHilitedIndex because they remain constant even after a sort. dgHilitedLine refers to the visible rows (plus a couple buffer rows I understand). dgHilitedIndex refers to any record in the dg data array. The index number will remain constant even after a sort (but not of course after setting the dgText or dgData). 

So if you were looping through all the visible records, use line. If through all the records in the data grid, use index. 

Bob


On Dec 8, 2011, at 6:47 AM, Mike Bonner wrote:

> Hey cool. Didn't occur to me to ignore the built in function and grab it
> directly.  Haven't tried it but would sure simplify nicely. Thx!
> 
> On Thu, Dec 8, 2011 at 7:41 AM, <dunbarx at aol.com> wrote:
> 
>> 
>> Hi.
>> 
>> Why not just:
>> 
>> on mouseUp
>> get the dgDataOfLine[2] of grp "yourDG"
>> combine it with return and tab
>> answer it
>> end mouseUp
>> 
>> Craig Newman
>> 
>> 
> _______________________________________________
> 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