I don't know if you have had this reported, but the code folding feature does not seem to work reliably in PowerShell scripts. I haven't seen the problem in other code types but I haven't looked hard. I have a Powershell script that adds a number of functions to my profile. Many of the functions have code folding but a few do not. They simply show up as full sections of code.
A side effect of this is the same functions that do not have folding, also do not show up in the Function/Method List dropdown either. Maybe that is the real problem?
I am using PrimalScript 4.1.535 Enterprise.
Kevin
Code Folding Broken with Powershell
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.
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.
- kevin.rappold@us.army.mil
- Posts: 5
- Last visit: Wed Nov 05, 2008 3:08 am
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Code Folding Broken with Powershell
That most likely means that PrimalScript's parser does not correctly parse the syntax of such a particular function. Since PowerShell's grammar is pretty new and fairly complex that is entirely possible.
The best way for us to fix that fast is to send a sample with such functions to support@sapien.com. We can adjust the parser and roll it into a service release.
Alex
The best way for us to fix that fast is to send a sample with such functions to support@sapien.com. We can adjust the parser and roll it into a service release.
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kevin.rappold@us.army.mil
- Posts: 5
- Last visit: Wed Nov 05, 2008 3:08 am
Code Folding Broken with Powershell
I will send up my profile script file. It is a little ugly because it is a work in progress but you can plainly see where the code folding doesn't work well.
Kevin
Kevin
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Code Folding Broken with Powershell
Thanks for sending the file. We'll roll the fix into the next service build.
The issues are pretty minor and you can work around them by
1. typing 'function' always in all lowercase
2. add a delimiting space between a function name and the { of the
function body.
That should make it all better until we roll the next build out.
Alex
The issues are pretty minor and you can work around them by
1. typing 'function' always in all lowercase
2. add a delimiting space between a function name and the { of the
function body.
That should make it all better until we roll the next build out.
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kevin.rappold@us.army.mil
- Posts: 5
- Last visit: Wed Nov 05, 2008 3:08 am