The data grid was created *precicely* because of this very thing. I for one was 
constantly begging for a table object of some sort, imagining that it would 
work like an Excel Spreadsheet, but as many pointed out, there would be 
problems when the data put into a table object was too much for Livecode to 
want to deal with. 

I do not see creating a datagrid as a "knee-jerk" reaction any more than using 
a menu button is when trying to create a popup menu. If you need an object that 
can display a table of data, that can be addressed pretty simply, the DataGrid 
is what you want. 

So here is a bit of code:

set the dgData of group "dgDataGrid" to aArrayData
put the dgDataOfLine [3] into aDataRecord
put aDataRecord ["food type"] && aDataRecord ["topping1"] into tLunchEntree

It's not that difficult. Now if you want to find the record containing 
"biscuit":

dispatch findIndex to group "dgDataGrid" with ""food type", "Biscuit"
put the result into tFoundIndex
put the dgDataOfIndex [tFoundIndex] into aDataRecord

Piece of cake! Here is the DataGrid API link: 
http://lessons.livecode.com/m/datagrid/l/7344-data-grid-api

Bob S


> On Jun 29, 2017, at 24:45 , Richmond Mathewson via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Of course the easy answer to my post is to do a knee-jerk "datagrid" or a 
> "wait for datagrid 2" response,
> but not all of us really want the high learning and coding overhead that the 
> datagrid involves, especially when
> we might be dealing with a simple 10 x 10 table of data.
> 
> Richmond.


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to