PowerShell Studio 2018 auto-closing error

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 7 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.
User avatar
JohnMoe
Posts: 20
Last visit: Wed Dec 02, 2020 11:45 pm

PowerShell Studio 2018 auto-closing error

Post by JohnMoe »

Hi all,

I'm using PowerShell Studio 2018 Version 5.5.153 64-bit on Windows 10 Pro 64-bit. I've disabled all Auto-insert options, as moving my hand to navigation around them slows down my typing. This works for most things, like parenthesis, quotes, etc., but for some reason, when I'm putting in parameter lists to my functions, it's inserting a closing ']':

Code: Select all

function test() {
  param (
    [Parameter(
After typing the "(", it auto-inserts a closing "]" for me.

Also, is there a way I can tell it not to squish my parameter type declaration into the name? So

Code: Select all

[System.String] $myString
doesn't get mashed together like:

Code: Select all

[System.String]$myString
Cheers,

John Moe
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: PowerShell Studio 2018 auto-closing error

Post by mxtrinidad »

Hum! I don't seem replicate the issue with the parameter part. It works on my end:

function test() {
param (
[parameter()])
:
};

Although, I never seen the function name with parenthesis "test()".

I do agree about having a space between the type accelerator and the variable:
[string] $test

Thanks for letting us know and will get back to you.
:)
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PowerShell Studio 2018 auto-closing error

Post by davidc »

PrimalSense will complete the type closing bracket automatically. We will tie this to the Auto-insert option for square brackets.

As for the spacing, I will make a note, but I encourage you to file a feature request using our feature requests page:

https://www.sapien.com/requests
David
SAPIEN Technologies, Inc.
User avatar
JohnMoe
Posts: 20
Last visit: Wed Dec 02, 2020 11:45 pm

Re: PowerShell Studio 2018 auto-closing error

Post by JohnMoe »

Hi David,

Sorry for not getting back to you sooner; I got the original reply notification from MXTrinidad, but I didn't get one from your reply, so I didn't know there was anything new to read. :-)

I know that there is an option to auto-insert square brackets; my point is with that turned off, in that instance, it still auto-inserts the closing bracket, which then makes the previous code look like this after I type the last open parenthesis:

Code: Select all

function test {
  param (
    [Parameter(]
As for the other item, I'll make a feature request now. :-)

Cheers,

John Moe
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PowerShell Studio 2018 auto-closing error

Post by davidc »

It will be tied to the auto-insert square brackets in the next service release. In the current build, they are not bound.
David
SAPIEN Technologies, Inc.
User avatar
JohnMoe
Posts: 20
Last visit: Wed Dec 02, 2020 11:45 pm

Re: PowerShell Studio 2018 auto-closing error

Post by JohnMoe »

Hi David,

Sorry, I just re-read what you said before and I mis-interpreted what you said. I look forward to the next release, then. :-)

Cheers,

John Moe
This topic is 5 years and 7 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.