Page 1 of 1

Param() default value is not appearing properly if $env:... is being used.

Posted: Fri Jan 15, 2016 6:37 am
by FrankAndrew
Product, version and build: PowerShell Studio 2015
32 or 64 bit version of product: 64
Operating system: Windows 7 Enterprise [6.1.7601]
32 or 64 bit OS: 64

Hi Guys and Gals,

Here I am again with the next PowerShell Studio Problem.

Here is a code snippet of the param() block:
2016.01.15_11-06-09_ScriptParamCodeBlock.png (30.35 KiB) Viewed 1599 times
As you can see on line 58 the default value should be $env:COMPUTERNAME.

Here is what is currently being presented:
2016.01.15_11-05-45_Run-or-Debug_Parameters_Dialog_DefaultValues.png (16.71 KiB) Viewed 1599 times
As you can see you guys/gals are only putting the name of the variable into the field as if there was NO default value.

For the Parameter on line 63 it DOES display the correct value but it was a literal string and that is easy to transfer from the code to the dialog.

This is how I think it should be reacting:

oops! I can only include/attach three (3) file!!!

You will have to open the attached ZIP file and have a look at the file:

(Think of the %COMPUTERNAME% being replace with the proper environment variables value for the machine that I am current working on)

I hope you can "fix" this, if NOT let me know why not.

By the way your web-site application that helps us fill in these BUG-REPORTs is VERY good BUT after I have attached three (3) attachments and tried to attach another it first Looks like it is going to work but..... after the fileChooser Dialog has been closed using the "Open" button nothing really happens!! There is NO new file in the attachments list AND there is NO Dialog or message telling me that this fourth file is NEVER going to be included.

Maybe you should deactivate the "Add files" after three files have been attached and re-activate it when one is deleted. That sould help.

This app crashed on me the first time I tried to add a fourth file. In the next try it just ignored the "Open" selection attempt as far as I could see.

Re: Param() default value is not appearing properly if $env:... is being used.

Posted: Wed Mar 02, 2016 12:27 pm
by davidc
This issue should be resolved in the 2016 release.