Config Dialog Textfield Caching

Posted on
Sun Dec 27, 2020 9:37 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Config Dialog Textfield Caching

That's probably not the right way to describe it....

I have some plugin devices with config dialogs that have a lot of controls. So I thought that I would group them and use a dropdown menu to switch between the groups. This works really well but I have noticed that text entered into a textfield is not "cached" to the values dict unless focus is removed from the textfield before it's hidden. For example:

Enter something into textfield A, and leave focus on the field.
Select a new group from the dropdown (which hides textfield A).
Select the group containing textfield A again.
Entered text is gone.

If focus is moved away from textfield A before switching groups, it's retained. I've tried several iterations of attaching callbacks to the dropdown menu and to the textfield to try to force the text to be cached. I thought I had hit on a solution but either (a) I was wrong, or (b) I lost it. The dropdown to switch groups is *not* a dynamic list.

Is there a reliable way to cache the text when the textfield is hidden (while it still has focus)?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 28, 2020 11:24 am
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Config Dialog Textfield Caching

I don't think there's anything you can do about it. Most likely we'd need to make sure that we explicitly end editing when we redraw the dialog in the Mac client. I believe this used to happen automatically, so maybe one of the recent macOS releases broke the behavior. We'll have a look.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Dec 28, 2020 12:06 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Config Dialog Textfield Caching

Thanks Jay - I think I have a way to get the user to click outside the control before changing groups. It's a bit of a hack, but it will work. At least I can stop looking. :D

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests