Using the GetDataOfLine function out of the message path?
Keith (Gulf Breeze Ortho Lab)
keith at gulfbreezeortholab.com
Thu Dec 8 15:17:24 EST 2011
From: Bob Sneidar
Sent: Thursday, December 08, 2011 10:24 AM
To: How to use LiveCode
Subject: Re: Using the GetDataOfLine function out of the message path?
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.
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:
>> Why not just:
>> on mouseUp
>> get the dgDataOfLine 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:
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the Use-livecode