diff --git a/table.go b/table.go index 9b7966e..81e8df3 100644 --- a/table.go +++ b/table.go @@ -15,13 +15,6 @@ type cellTest struct { jwc [20]ui.TableValue } -/* -type cellValue struct { - ref int // libUI reference int - value ui.TableValue // cell Value (TableString, TableColor or TableImage) -} -*/ - type modelHandler struct { name string rowcount int @@ -31,8 +24,7 @@ type modelHandler struct { generatedColumnTypes []ui.TableValue // generate this dynamically - // This is a needed function for libUI tables (maybe) - setCellValue func(*modelHandler, *ui.TableModel, int, int, ui.TableValue) + libUIevent func(*modelHandler, *ui.TableModel, int, int, ui.TableValue) } func initValues(mh *modelHandler) { @@ -89,8 +81,8 @@ func newModelHandler(rowcount int) *modelHandler { mh.rowcount = rowcount - // These are the standard callback functions for libUI - mh.setCellValue = defaultSetCellValue + // This is the standard callback function from libUI when the user does something + mh.libUIevent = defaultSetCellValue mh.rowBGcolor = 0 // this is the weird exception. Just always have this as 0 diff --git a/tableCallbacks.go b/tableCallbacks.go index f7e2fa0..7f869dd 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -31,11 +31,11 @@ func (mh *modelHandler) SetCellValue(m *ui.TableModel, row, column int, value ui log.Println("SetCallValue() START row=", row, "column=", column, "value=", value) // spew.Dump(m) // spew.Dump(mh) - if (mh.setCellValue == nil) { + 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.setCellValue(mh, m, row, column, value) + mh.libUIevent(mh, m, row, column, value) log.Println("SetCallValue() END") }