diff options
| author | Jeff Carr <[email protected]> | 2019-05-24 09:02:35 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-24 09:02:35 -0700 |
| commit | 265a8f6813f9be5dbf6c4c7f02f7a3e6dd9ab1be (patch) | |
| tree | 5301cdbfa142c2f6094336a142591b3f33b431ef /tableCallbacks.go | |
| parent | 9b29c265b26d1231cf9ddb7abf51e390197dabf1 (diff) | |
more mouse click handling cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tableCallbacks.go')
| -rw-r--r-- | tableCallbacks.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tableCallbacks.go b/tableCallbacks.go index 28ddd8b..8a1652a 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -16,14 +16,14 @@ import _ "github.com/andlabs/ui/winmanifest" func (mh *TableData) NumRows(m *ui.TableModel) int { if (Data.Debug) { - log.Println("NumRows = mh.RowCount = ", mh.RowCount) + log.Println("NumRows = mh.RowCount = ", mh.RowCount, "(last Row & Column =", mh.lastRow, mh.lastColumn, ")") } return mh.RowCount } // FYI: this routine seems to be called around 10 to 100 times a second for each table func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue { - if (Data.Debug) { + if (Data.DebugTable) { log.Println("ColumnTypes = ", mh.generatedColumnTypes) } return mh.generatedColumnTypes @@ -44,9 +44,11 @@ func libuiColorToGOlangColor(rgba color.RGBA) ui.TableColor { // TODO: Figure out why this is being called 1000 times a second (10 times for each row & column) // Nevermind this TODO. Who gives a shit. This is a really smart way to treat the OS toolkits func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue { - if (Data.Debug) { + if (Data.DebugTable) { log.Println("CellValue() row, column =", row, column) } + mh.lastRow = row + mh.lastColumn = column humanID := mh.Cells[column].HumanID if (column == mh.Human[humanID].TextID) { return ui.TableString(mh.Rows[row].HumanData[humanID].Text) @@ -99,7 +101,7 @@ func defaultSetCellValue(mh *TableData, row int, column int) { log.Println("vmname =", vmname) log.Println("defaultSetCellValue() FOUND THE BUTTON!!!!!!! Button was pressed START", row, column) Data.CurrentVM = fmt.Sprintf("%s",vmname) - log.Println("Data.CurrentVM =", Data.CurrentVM) + log.Println("User last clicked on Data.CurrentVM =", Data.CurrentVM) if (Data.Debug) { go ui.Main(ShowVM) } else { |
