09-29-2025 08:21 AM - edited 09-29-2025 11:15 AM
I have created a small test application using the MGI Panel Actor Framework and I have a design question. Here is a diagram of the structure, which you can see that there are non panel actors spun off of the main panel actor. What is the best way to handle the need to launch a panel actor from a nested non-panel actor?
Thanks,
Brian
Solved! Go to Solution.
09-29-2025 10:51 AM
Great pictures, I have a few things that come to mind, as far as these dialogs are concerned.
First off, maybe the naming is confusing, but there should only be one Root Actor here. That would be your Panel Actor [Main UI].
Launching the Panel Actor [dialog] as a nested panel actor seems the way to go. And since they're dialogs, you may not need to send them a stop from the Non Panel Actor. This is becuase you should handle the Panel Actor [dialog] quickly, and when the dialog is done, it'll send it's Last Ack back up to Non Panel Actor with it's necessary information.
I also think you need to save the enqueuers of the Panel Actor [dialog]s. This is because you create them with necessary information when initializing the object, it does it's thing as a dialog (user changes it's internal state through front panel actions), then sends it's Last Ack back to the caller for the caller to then get the state of the dialog (in it's Last Ack) and the dialog is identified using it's enqueuer.
09-29-2025 11:29 AM - edited 09-29-2025 12:06 PM
The original question is how to launch a panel actor from a non panel actor. I have updated the original diagram to show that the panels are windows and not dialog (although there could be a use case for wanting to reuse a dialog from a non panel actor.
The problem is that you cannot launch a nested panel from a non panel actor which this illustrates:
So as I explained, the option that I took was to launch a root actor
Once the Enqueuer is valid, we can just re-use the actor and show the FP
Both enqueuers are shared so information is updated and passed between these actors.
The only way to launch these panel actors, as nested panel actors would be to change the non panel owning actor to inherit from panel actor, which was my 2nd option.
09-29-2025 11:36 AM
Why can't you use the regular Launch Nested Actor instead of Launch Nested Panel Actor? A Panel Actor is still just an Actor, so it'll work with all the normal Actor Framework VI's.
09-29-2025 11:55 AM
Oh, I see, thanks for the clarification. I hadn't ran into this before.. I don't have an immediate suggestion. (BTW update the second picture, it's a duplicate of the first picture).
I agree that launching a root actor again seems odd.. there has to be a better way.. I'll be listening
09-29-2025 12:10 PM
BertMcMahan: The Launch Nested Panel Actor is how the panel is registered
NathanDavis: Thanks for pointing out the mistake and thanks for taking the time to respond
09-29-2025 04:16 PM
Ah, I understand, sorry. I missed that you had panel actors launching non-panel actors which launched more panel actors.
There is a VI to do this already but it's probably not where you think it is- drop in Launch Root Panel (which is polymorphic), then in the dropdown select "Any (Nested Actor)":
The Help specifies "Launches a root panel as a nested actor of a non-panel actor". So, all you need to do is change the polymorphic instance you're using and you're good to go 🙂
09-29-2025 05:34 PM
Thanks for pointing out the obvious!!! I guess sometimes the answer is right in front of you.
Here is the correct implementation for anyone else
09-29-2025 05:41 PM
I'd argue it isn't that obvious... I was digging around in the framework looking for something else and just stumbled on it.
And having "Launch nested actor" as a function of "Launch root actor" isn't what I'd consider obvious, hah.
I think I'd instead have "Launch Nested Actor" be polymorphic and include this function there, as that's where you tried to use it anyway. But, then again they may've had a good reason to do it the way they did, so who knows.
Glad you got it working, and I'm happy I learned something new myself 🙂