Cross File Class Support

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 4 years and 11 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
DavidSunter
Posts: 7
Last visit: Tue Aug 15, 2023 3:05 am

Cross File Class Support

Post by DavidSunter »

Product, version and build: PowerShell Studio 2019 5.6.161
32 or 64 bit version of product: 64 bit
Operating system: Windows 10 1709 16299.1087
32 or 64 bit OS: 64 bit

I'm creating a new forms project and want to add a bunch of PowerShell classes/enums to the project. When I do this, there appears to be little support for syntax errors across the different files. Files are set to Build:Include and Shared:True
Globals.ps1 and Form.psf are able to 'see' the classes/enums, however, accessing class1.ps1 from class2.ps1 gives syntax errors (unable to find type). Adjusting the build order will allow the project to compile and work fine but I'd like to get rid of the syntax errors.

Is this something that is supported?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Cross File Class Support

Post by davidc »

Yes, the syntax errors are only displayed for the active document. If this is a feature you would like to have, I highly encourage you to submit a feature request here:

https://sapien.com/requests
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Cross File Class Support

Post by davidc »

Could you zip and upload a sample project that demonstrates the syntax error issue here:

https://sapien.com/support/upload/

Thank you,
David
SAPIEN Technologies, Inc.
User avatar
DavidSunter
Posts: 7
Last visit: Tue Aug 15, 2023 3:05 am

Re: Cross File Class Support

Post by DavidSunter »

Thanks, I've built and uploaded a demo project that showcases the mentioned issues and also raised a feature request as suggested.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Cross File Class Support

Post by davidc »

Thank you for the sample. We will see what we can do.
David
SAPIEN Technologies, Inc.
This topic is 4 years and 11 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.