Set initial (i.e. on display panel) value in text fields in panels

I’m using a couple of panels in my application and I can;t figure out how to set initial (i.e. on display panel) value in text fields in the panels. If I try and do it in the on awake from nib handler it seems that the panel isn’t yet ready to receive the values. I can do it by waiting until I get in an idle block, but that’s ugly (the panel opens with uninitialized fields and waits for a second or two to get the data).

One specific use case is a preferences panel. I want to retrieve user defaults info and display this in the appropriate fields in the preferences panel when the panel opens.

Where/how in my code should I do this?

Thanks,

Maddog

maddog2020…a search for “preferences” in the search feature of this forum will turn up a lot of results for you :wink:

I was active in THIS THREAD from a couple weeks ago, it should contain all you need to do what you’re doing. Attaching your panel’s ‘window’ to an ‘on will open’ event and then adding the appropriate code to get the preferences will update all of your settings before the window is displayed, every time it is displayed.

j