To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Powershell Studio 2019 build 5.6.167
32 or 64 bit version of product: 64 bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit
*** Please add details and screenshots as needed below. ***
I'm building a project with multiple classes and the IDE acts like it doesn't know about the other classes when I use one in a class but it does when I use one in main. The code itself runs fine, but I don't get any class method hints and on the left it has an error arrow with "Unable to find type [ClassName]".
Is there some way to get the method hints for one class when using in another?
IDE and classes
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.
Re: IDE and classes
With your project open, set your class ps1 files Shared property to true from the Properties panel:
When a project is built, the script files and psf files are exported into one script file. This is why your project still runs despite your classes not being found in the editor.
Your classes should then appear in the Functions panel.When a project is built, the script files and psf files are exported into one script file. This is why your project still runs despite your classes not being found in the editor.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: IDE and classes
That's already set and it still has the issue.brittneyr wrote: ↑Wed Aug 05, 2020 11:03 am With your project open, set your class ps1 files Shared property to true from the Properties panel:
SPS_PropertiesSharedTrue.png
Your classes should then appear in the Functions panel.
When a project is built, the script files and psf files are exported into one script file. This is why your project still runs despite your classes not being found in the editor.
Re: IDE and classes
That needs to be set true for all class ps1 files. I have not been able to replicate this issue.
What type of project are you using?
How are you instantiating your class and calling your methods?
Without seeing code, there is a limit on to how much I can assist you. Can you upload your project here:
https://www.sapien.com/support/upload
What type of project are you using?
How are you instantiating your class and calling your methods?
Without seeing code, there is a limit on to how much I can assist you. Can you upload your project here:
https://www.sapien.com/support/upload
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: IDE and classes
I figured out why type hinting wasn't working while trying to recreate. I had removed the type casting in the property declaration because of some troubleshooting. Adding it back fixed hinting but the error in the IDE on the left saying "Unable to find type [MyType]" persists. Maybe just a harmless bug?
And yeah -- that's just a touch embarrassing.
And yeah -- that's just a touch embarrassing.