Error with running form project with browse for folder textbox

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Hal242
Posts: 12
Last visit: Thu Apr 30, 2020 9:09 pm

Error with running form project with browse for folder textbox

Post by Hal242 »

Product, version and build: PowerShell Studio 2019
64 bit version
Operating system: x64 Windows 10 Pro, version 1809 fully patched

I keep having errors when I run form projects. Below is the error and it happens even if I create a new empty project and add a TextBox - Browse for Folder control (or others too);

Code: Select all

ERROR: Split-Path : Cannot bind argument to parameter 'Path' because it is null.
Globals.ps1 (23, 14): ERROR: At Line: 23 char: 14
ERROR: +             Split-Path $hostinvocation.MyCommand.path
ERROR: +                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR:     + CategoryInfo          : InvalidData: (:) [Split-Path], ParameterBindingValidationException
ERROR:     + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.SplitPathCommand
ERROR:
>> Script Ended
I just encountered this error again on a brand new project with only the single control set object. If I create an empty form project, no error. Sometimes I can create a complex form project and it does not get this error for a while, until I have made many controls and then run into some other error, then the split-path error occurs - even though I NEVER have edited the Global.ps1 file.

To reproduce this error (I can repeatedly reproduce it), do the following;

1. Create new multi form project
2. Add TextBox - Browse for Folder control
3. press f5 to run
4. click the ellipsis to browse for a folder
5. form hangs and I have to hard exit by repeatedly pressing red x to close the form then it returns an error that its not responding and if I keep clicking red X, it gives external script driver is not responding error, where I can click wait or close the program.


Am I missing something obvious in the creation of this control?

When I replace #2 above with TextBox - Browse for File, it works as expected with no error.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Error with running form project with browse for folder textbox

Post by davidc »

This could be an issue with our internal host that was introduced with the last update. It will be resolved in the next service release.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Error with running form project with browse for folder textbox

Post by davidc »

If you like, you can download a temporary fix for the issue. Please refer to the following topic:

viewtopic.php?f=12&t=13597#p71634
David
SAPIEN Technologies, Inc.
Hal242
Posts: 12
Last visit: Thu Apr 30, 2020 9:09 pm

Re: Error with running form project with browse for folder textbox

Post by Hal242 »

thanks David. This solved it and now the control works as expected.
This topic is 5 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.