summaryrefslogtreecommitdiff
path: root/tableCallbacks.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-12 21:01:22 -0700
committerJeff Carr <[email protected]>2019-05-12 21:01:22 -0700
commitdd753552fdd28cc1feff911e51976a6946c502d1 (patch)
treee411b9243edec2a572a13a6dab5c2b3e3d9a5e06 /tableCallbacks.go
parentc58f4d0c61b9e5731a69ff2ce75111c37dd818ae (diff)
some data is flowing all the way through to the GUI for the first time
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tableCallbacks.go')
-rw-r--r--tableCallbacks.go22
1 files changed, 17 insertions, 5 deletions
diff --git a/tableCallbacks.go b/tableCallbacks.go
index 9f8f707..7c05d0e 100644
--- a/tableCallbacks.go
+++ b/tableCallbacks.go
@@ -28,17 +28,29 @@ 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("SetCallValue() START row=", row, "column=", column, "value=", value)
- // spew.Dump(m)
- // spew.Dump(mh)
+ 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)
}
- // spew.Dump(m)
+
mh.libUIevent(mh, m, row, column, value)
if (mh.cellChangeEvent != nil) {
mh.cellChangeEvent(row, column, value)
}
- log.Println("SetCallValue() END")
+
+ log.Println("mh.Rows[0].Cells[column].HumanID =", mh.Rows[0].Cells[column].HumanID)
+ log.Println("mh.Rows[row].Cells[column].HumanID =", mh.Rows[row].Cells[column].HumanID)
+
+ humanID := mh.Rows[row].Cells[column].HumanID
+ log.Println("mh.Rows[row].Human[humanID].ColorID =", mh.Rows[row].Human[humanID].ColorID)
+ log.Println("mh.Rows[row].Human[humanID].TextID =", mh.Rows[row].Human[humanID].TextID)
+
+ if (column == mh.Rows[row].Human[humanID].TextID) {
+ log.Println("THIS COLUMN IS A TEXT COLUMN")
+ mh.Rows[row].Cells[column].Value = mh.Rows[row].Human[humanID].Text
+ }
+
+ log.Println("SetCellValue() END")
}