Quantcast
Channel: SAPIEN Forums
Viewing all articles
Browse latest Browse all 540

Customer Service • $Script:Variable work in debug mode but not in build

$
0
0
Hi Community,

I declared a variable :

Code:

[Boolean]$sortDescending = $False
When I modify it in a function, it works in debug mode. It no longer works in the compiled exe.

Code:

 $LV_WSFilesHeaderName.add_Click({        if ($sortDescending) {            $FolderWS.ListFiles = $FolderWS.ListFiles | Sort-Object -Property FullName -Descending            $Script:sortDescending = $False        }        else {            $FolderWS.ListFiles = $FolderWS.ListFiles | Sort-Object -Property FullName            $Script:sortDescending = $True        }        $XMLForm.DataContext[1] = $FolderWS    })
Thank you for your attention

Statistics: Posted by Frigoult — Mon Oct 28, 2024 3:42 am



Viewing all articles
Browse latest Browse all 540

Trending Articles