From be696b98aa22f9cc449236cc6b001f53fde8afc0 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 4 Mar 2025 01:58:24 -0600 Subject: [PATCH] test to make a frozen channel --- init.go | 1 + plugin.go | 5 +++++ structs.go | 1 + 3 files changed, 7 insertions(+) diff --git a/init.go b/init.go index f2fa6ad..da00c80 100644 --- a/init.go +++ b/init.go @@ -47,6 +47,7 @@ func (me *TreeInfo) catchActionChannel() { func New() *TreeInfo { me := new(TreeInfo) me.pluginChan = make(chan widget.Action, 1) + me.frozenChan = make(chan widget.Action, 1) me.config = configLoad() log.Log(TREE, "Init() start channel reciever") diff --git a/plugin.go b/plugin.go index ce1f51a..3df0607 100644 --- a/plugin.go +++ b/plugin.go @@ -77,3 +77,8 @@ func (me *TreeInfo) PluginChannel() chan widget.Action { me.WaitOK() return me.pluginChan } + +// this is the function that receives things from the application +func (me *TreeInfo) FrozenChannel() chan widget.Action { + return me.frozenChan +} diff --git a/structs.go b/structs.go index 8224df6..53c058a 100644 --- a/structs.go +++ b/structs.go @@ -23,6 +23,7 @@ type TreeInfo struct { config *ToolkitConfigs // protobuf of plugin settings callback chan widget.Action // mouse clicks or keyboard events back to the program pluginChan chan widget.Action // this is the channel we get requests to make widgets + frozenChan chan widget.Action // expirement to get fyne to work Add func(*Node) // add a new widget AddText func(*Node, string) // add a string to a dropdown widget SetText func(*Node, string) // set the text of a widget