Syntax Highlighting and PrimalSense not working within -Property @{ }

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 1 week 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

Syntax Highlighting and PrimalSense not working within -Property @{ }

Post by JohnMoe »

Product, version and build: SAPIEN PowerShell Studio 2019, Version 5.6.160
32 or 64 bit version of product: 64 bit
Operating system: Windows 10 Professional, Build 1803
32 or 64 bit OS: 64 bit

Using the following code, both syntax highlighting and autocomplete (PrimalSense) won't work inside the outer -Property @{ } block. See attached screenshot for how it looks on my system in PowerShell Studio. I believe it was working a couple of days ago, so I have a feeling something in the latest update changed how it's handling this?

Code: Select all

$computerLabel = New-Object -TypeName System.Windows.Forms.Label -Property @{
  AutoSize = $true
  Location = New-Object -TypeName System.Drawing.Point -Property @{
    X = 5
    Y = 32
  }
  Size     = New-Object -TypeName System.Drawing.Size -Property @{
    Height = 25
    Width  = 100
  }
  Text     = 'Computer Name'
}
Attachments
screenshot.jpeg
screenshot.jpeg (45.5 KiB) Viewed 3879 times
User avatar
brittneyr
Site Admin
Posts: 1672
Last visit: Wed Apr 17, 2024 1:24 pm
Answers: 39
Been upvoted: 31 times

Re: Syntax Highlighting and PrimalSense not working within -Property @{ }

Post by brittneyr »

Thanks for reporting the issue.
The issue has been sent to the proper place for evaluation and correction. When a fix is issued with a service build, it will be listed in the change log.
Brittney
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Syntax Highlighting and PrimalSense not working within -Property @{ }

Post by davidc »

If you wrap the expression in parenthesis, you will get the correct coloring.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Syntax Highlighting and PrimalSense not working within -Property @{ }

Post by davidc »

This issue will be resolved in the next service release.
David
SAPIEN Technologies, Inc.
User avatar
JohnMoe
Posts: 20
Last visit: Wed Dec 02, 2020 11:45 pm

Re: Syntax Highlighting and PrimalSense not working within -Property @{ }

Post by JohnMoe »

Thanks, thanks, and thanks. :-) I look forward to the next release.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Syntax Highlighting and PrimalSense not working within -Property @{ }

Post by davidc »

We released the v5.6.161 service build that resolves this issue.
David
SAPIEN Technologies, Inc.
This topic is 5 years and 1 week 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.