futher choose better names
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
b28c2c09fa
commit
97d7ad349e
14
table.go
14
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
|
||||
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue