Hi all,
I have Panel_2 referenced inside Panel_1. I calculate some values inside the Init script of Panel_1. I need to use the values in the Init script of Panel _. How can this be achieved?
I've tried setting up $-parameters on Panel_2, but can't figure out a way to set them from the Init script. Is this possible or is another method advised?
Kind regards,
Angus Heyworth
How to pass variables in a panel Init script into the Init script of a reference panel inside that panel. ?
- AngusETM
- Posts:37
- Joined: Tue Apr 25, 2017 4:48 pm
How to pass variables in a panel Init script into the Init script of a reference panel inside that panel. ?
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: How to pass variables in a panel Init script into the Init script of a reference panel inside that panel. ?
Assuming Version 3.16.
You can't pass values in this way since the init scripts of PanelRefs are started before the Panel_1 init script.
Better define a public method in the ScopeLib of the PanelRef, then after calculating the Panel_1 value, execute the PanelRef's public function from Panel_1's init script, passing the value.
You can't pass values in this way since the init scripts of PanelRefs are started before the Panel_1 init script.
Better define a public method in the ScopeLib of the PanelRef, then after calculating the Panel_1 value, execute the PanelRef's public function from Panel_1's init script, passing the value.
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: How to pass variables in a panel Init script into the Init script of a reference panel inside that panel. ?
However in your panelRef an event could be defined, which can be used to pass the newly calculated values to the parent panel.
After the calculation trigger the event with the new values.
After the calculation trigger the event with the new values.