Alternate Form of printKeys()

Bob Sneidar bobs at twft.com
Thu Jan 26 18:07:09 EST 2012


Try this in a fresh datagrid with no data:

on populateDatagrid
    put "text1" into theDataA[1]["column1"]
    put "text2" into theDataA[1]["column2"]
    put "text3" into theDataA[2]["column1"]
    put "text4" into theDataA[2]["column2"]
    put "column1" into theColumns
    put "Column 1" into theLabels
    put 150 into theWidths
    set the dgProp["columns"] of group "Datagrid1" to theColumns -- I got this wrong in another email sorry
    set the dgProp["column labels"] of group "Datagrid1" to theLabels
    set the dgProp["column widths"] of group "Datagrid1" to theWidths
    set the dgData of group "Datagrid1" to theDataA
    put the dgText of group "Datagrid1" & cr & "-----" & cr & \
            printkeys(the dgData of group "Datagrid1")
end populateDatagrid

You should only see column 1 but printkeys should be showing you the entire array. 

Bob


On Jan 26, 2012, at 2:37 PM, Pete wrote:

> Not disputing the usefullness of your routine or what you are seeing re
> dgtext/dgdata but that's NOT what I see in any of my datagrids - I see all
> columns in dgText not just hidden ones.  If I didn't, my apps would fail
> disastrously.  So let's try to figure out what's different between your
> situation and mine - LC version, OS, dg config , what else?
> 
> On Thu, Jan 26, 2012 at 2:20 PM, Bob Sneidar <bobs at twft.com> wrote:
> 
>> but as I have mentioned before, I have columns of data that do not display
>> in the datagrid, and dgText only returns the visible columns of text.
> 
> 
> 
> 
> -- 
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> _______________________________________________
> 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