Panel startup questions #759
Replies: 2 comments
-
|
before any modulators are created is like a constructor, where you can initialise certain constants, like defines. For example, you could set up an alias for With when the panel has finished loading you can then do things with modulators etc. For example, There might be a caveat where some other methods might fire before or before any modulators are created, so in that case you need to block them with something like: if panel:getBootstrapState() then
return
endbut I think there are problems with that function in exported restricted instances sometimes, so better to use something like this (see Panel Class in panel): |
Beta Was this translation helpful? Give feedback.
-
|
Thanks John. I was having issues trying to create a splash screen thing to cover up a bunch of uninitialized controls. Solution for now is to mark the main group as not visible in the editor, then show it when I'm ready. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I see that I can define a method to be called "before any modulators are created" and also "when the panel has finished loading".
What are the best practices use for these two?
Which one comes first? The name kind of implies "Before modulators are created" comes first.
If I'm defining a bunch of global tables and variables, is it better to place them in the "before" call?
Odd things I see - if I try to do setVisible(false) in the "when panel has finished loading", it doesn't seem to do it.
I can do some things like blank out a name, but other things do not seem to get called.
Also - does setting up variables for modulators need to happen after 'Before any modulators are created" or can I make those assignments - fx_return = panel:getModulatorByName("fx_return") inside that method?
Beta Was this translation helpful? Give feedback.
All reactions