Skip to content

Commit

Permalink
more renaming of core packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Apr 14, 2024
1 parent 695c419 commit be6b2bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions slboolview/slboolview.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
package slboolview

import (
"cogentcore.org/core/core"

Check failure on line 8 in slboolview/slboolview.go

View workflow job for this annotation

GitHub Actions / build

import "cogentcore.org/core/core" is a program, not an importable package
"cogentcore.org/core/events"
"cogentcore.org/core/gi"
"cogentcore.org/core/giv"
"cogentcore.org/core/laser"
"cogentcore.org/core/reflectx"

Check failure on line 10 in slboolview/slboolview.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cogentcore.org/core/reflectx; to add it:
"cogentcore.org/core/views"

Check failure on line 11 in slboolview/slboolview.go

View workflow job for this annotation

GitHub Actions / build

no required module provides package cogentcore.org/core/views; to add it:
"github.com/emer/gosl/v2/slbool"
)

func init() {
giv.AddValue(slbool.Bool(0), func() giv.Value {
views.AddValue(slbool.Bool(0), func() views.Value {
return &BoolValue{}
})
}

// BoolValue presents a checkbox for a boolean
type BoolValue struct {
giv.ValueBase[*gi.Switch]
views.ValueBase[*core.Switch]
}

func (v *BoolValue) Config() {
Expand All @@ -30,7 +30,7 @@ func (v *BoolValue) Config() {
}

func (v *BoolValue) Update() {
npv := laser.NonPtrValue(v.Value)
npv := reflectx.NonPtrValue(v.Value)
sb, ok := npv.Interface().(slbool.Bool)
if ok {
v.Widget.SetChecked(sb.IsTrue())
Expand Down

0 comments on commit be6b2bb

Please sign in to comment.