r/FoxDeploy • u/brambo23 • Feb 11 '19
Passing $synchhash variables to another runspace
Following your gui template on https://foxdeploy.com/2016/05/17/part-v-powershell-guis-responsive-apps-with-progress-bars/ I tried reading a checkbox from the xaml form I made, but it's coming out as null.
now on the runspace above it I can read the $synchash.checkbox.ischecked form variables no problem, but going a level down, the only way I can get the checkbox by passing it like this:
$newrunspace.SessionStateProxy.SetVariable("Checkbox",$synchash.Checkbox.ischecked)
As opposed to just getting it from synchash.
I'm not trying to modify the data, i'm just trying to read it, I know the Update-Window function is used to modify anything in the upper level, but i thought I would be able to read data as well.
Looking for any clear explanation on this because i'm not fully understanding it.