futher choose better names

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-08 03:09:39 -07:00
parent b28c2c09fa
commit 97d7ad349e
2 changed files with 5 additions and 13 deletions

View File

@ -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

View File

@ -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")
}