From f8000c2e23eda98e1f99d5cfd9f9518d3532f47b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 May 2019 23:37:27 -0700 Subject: no longer need the setCell function callback Signed-off-by: Jeff Carr --- tableCallbacks.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tableCallbacks.go') diff --git a/tableCallbacks.go b/tableCallbacks.go index 06925e7..9930bb8 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -6,7 +6,6 @@ package gui // and feed back user interaction with the GUI // -import "os" import "log" import "github.com/andlabs/ui" @@ -38,12 +37,8 @@ func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue func (mh *TableData) SetCellValue(m *ui.TableModel, row, column int, value ui.TableValue) { log.Println("SetCellValue() START row=", row, "column=", column, "value=", value) - if (mh.libUIevent == nil) { - log.Println("CellValue NOT DEFINED. This table wasn't setup correctly! mh.scanCellValue == nil") - os.Exit(-1) - } + defaultSetCellValue(mh, row, column) - mh.libUIevent(mh, m, row, column, value) if (mh.cellChangeEvent != nil) { mh.cellChangeEvent(row, column, value) } @@ -57,3 +52,9 @@ func (mh *TableData) SetCellValue(m *ui.TableModel, row, column int, value ui.Ta log.Println("SetCellValue() END") } + +func defaultSetCellValue(mh *TableData, row int, column int) { + if (mh.Rows[row].Cells[column].Name == "BUTTON") { + log.Println("defaultSetCellValue() FOUND THE BUTTON!!!!!!! Button was pressed START", row, column) + } +} -- cgit v1.2.3