summaryrefslogtreecommitdiff
path: root/tableCallbacks.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-12 23:37:27 -0700
committerJeff Carr <[email protected]>2019-05-12 23:37:27 -0700
commitf8000c2e23eda98e1f99d5cfd9f9518d3532f47b (patch)
tree499426dbf6967babf7415d60b6780b6d90e97878 /tableCallbacks.go
parentab3cb833853a32d64e383d9f7cf5a3cc6bf9e310 (diff)
no longer need the setCell function callback
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tableCallbacks.go')
-rw-r--r--tableCallbacks.go13
1 files changed, 7 insertions, 6 deletions
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)
+ }
+}