diff options
| author | Jeff Carr <[email protected]> | 2023-03-24 20:14:18 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-03-24 20:14:18 -0500 |
| commit | 6f91f5e080e06cdc0f34b13d23e5fd16ea37259a (patch) | |
| tree | 7037a36829c644dccc7cb78ee6f87f87f88aed21 /toolkit/andlabs/spinner.go | |
| parent | d4787a1ebdd08359746516dbb72f1feaf95be5b6 (diff) | |
starting to try safe chan and goroutines
fix tab title's
right before attempting to add chan goroutines
removed "where" widget pointer
box added to tab
experiement with log as it's own repo
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/spinner.go')
| -rw-r--r-- | toolkit/andlabs/spinner.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/andlabs/spinner.go b/toolkit/andlabs/spinner.go index 6a47472..3f1f657 100644 --- a/toolkit/andlabs/spinner.go +++ b/toolkit/andlabs/spinner.go @@ -7,19 +7,21 @@ import ( _ "github.com/andlabs/ui/winmanifest" ) -func (t *andlabsT) newSpinner(w *toolkit.Widget) *andlabsT { - // make new node here - log(debugToolkit, "newSpinner()", w.X, w.Y) +func (t *andlabsT) newSpinner(a *toolkit.Action) *andlabsT { var newt andlabsT + w := a.Widget + log(debugToolkit, "newSpinner()", w.X, w.Y) s := ui.NewSpinbox(w.X, w.Y) newt.uiSpinbox = s newt.uiControl = s newt.tw = w + newt.wId = a.WidgetId + newt.Type = toolkit.Spinner s.OnChanged(func(s *ui.Spinbox) { newt.tw.I = newt.uiSpinbox.Value() - newt.commonChange(newt.tw) + newt.commonChange(newt.tw, a.WidgetId) }) return &newt @@ -28,16 +30,14 @@ func (t *andlabsT) newSpinner(w *toolkit.Widget) *andlabsT { func newSpinner(a *toolkit.Action) { var newt *andlabsT w := a.Widget - parentW := a.Where - t := mapToolkits[parentW] + t := andlabs[a.WhereId] if (t == nil) { - log(debugError, "NewSpinner() toolkit struct == nil. name=", parentW.Name, w.Name) + log(debugError, "NewSpinner() toolkit struct == nil. name=", w.Name) return } w.X = a.X w.Y = a.Y - newt = t.newSpinner(w) + newt = t.newSpinner(a) place(a, t, newt) - mapWidgetsToolkits(a, newt) } |
