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/slider.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/slider.go')
| -rw-r--r-- | toolkit/andlabs/slider.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/andlabs/slider.go b/toolkit/andlabs/slider.go index 181b258..8554bab 100644 --- a/toolkit/andlabs/slider.go +++ b/toolkit/andlabs/slider.go @@ -7,19 +7,21 @@ import ( _ "github.com/andlabs/ui/winmanifest" ) -func (t *andlabsT) newSlider(w *toolkit.Widget) *andlabsT { - // make new node here - log(debugToolkit, w.Name, w.Type, w.X, w.Y) +func (t *andlabsT) newSlider(a *toolkit.Action) *andlabsT { var newt andlabsT + w := a.Widget + log(debugToolkit, w.Name, w.Type, w.X, w.Y) s := ui.NewSlider(w.X, w.Y) newt.uiSlider = s newt.uiControl = s newt.tw = w + newt.Type = toolkit.Slider + newt.wId = a.WidgetId s.OnChanged(func(spin *ui.Slider) { newt.tw.I = newt.uiSlider.Value() - newt.commonChange(newt.tw) + newt.commonChange(newt.tw, a.WidgetId) }) return &newt @@ -28,17 +30,15 @@ func (t *andlabsT) newSlider(w *toolkit.Widget) *andlabsT { func newSlider(a *toolkit.Action) { var newt *andlabsT w := a.Widget - parentW := a.Where log(debugToolkit, "newSlider()", w.Name) - t := mapToolkits[parentW] + t := andlabs[a.WhereId] if (t == nil) { - log(debugError, "newSlider() ERROR toolkit struct == nil. name=", parentW.Name, w.Name) + log(debugError, "newSlider() ERROR toolkit struct == nil. name=", w.Name) return } w.X = a.X w.Y = a.Y - newt = t.newSlider(w) + newt = t.newSlider(a) place(a, t, newt) - mapWidgetsToolkits(a, newt) } |
