I'm currently working on a GUI-project where I plan to gather some handy tools for AD, Exchange, Fileserver and so on in one tool.
During the work with this tool, using Powershell Studio I get some strange behavior that I can't understand.
This is what happens:
I can work on one tool for a while and work my way through the GUI-components and their events. Of course there will be errors during development of the events but nothing that can't be solved.
The strange thing is that once I leave finished components and move on to others, an event that previously worked fine stops working all of a sudden, without me touching it. If I then double-click the components to go to the onClick, it's still there, containing all the code it used to when it worked.
What I've found working so far is, I copy all the code from inside the event, and remove the event. I then make a new event completely the same and paste the code back. Then it works again.
Have anyone else had these problems and if so, did you find any cause/solution to them?
Peculiar behavior
Forum rules
Do not post any licensing information in this forum.
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 any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Peculiar behavior
This is very common while you are learning. It is caused by making changes that you do not realize overwrite other elements. There is no way for us to know exactly what you are doing wrong.
I recommend starting bygoingthrough all or most of the examples in the blog on this site. It is a very good walk-through of how to design and build forms.
Do not try to do very complex things until you understand how this works. Working is evented systems is not like other scripting or other tools/systems. You must learn how the event system dispatches and handles events. Once that is understood you can use online documentation to review how each control behaves.
The edit environment also has behaviors that you will have to learn. It will come slowly at first but you will eventually catch on. The basics cannot be easily guessed at. You really must use a learning tool.
Start here http://www.sapien.com/blog/2013/10/16/p ... oolmaking/
Then here -> http://www.sapien.com/blog/topics/user- ... istrators/
I recommend starting bygoingthrough all or most of the examples in the blog on this site. It is a very good walk-through of how to design and build forms.
Do not try to do very complex things until you understand how this works. Working is evented systems is not like other scripting or other tools/systems. You must learn how the event system dispatches and handles events. Once that is understood you can use online documentation to review how each control behaves.
The edit environment also has behaviors that you will have to learn. It will come slowly at first but you will eventually catch on. The basics cannot be easily guessed at. You really must use a learning tool.
Start here http://www.sapien.com/blog/2013/10/16/p ... oolmaking/
Then here -> http://www.sapien.com/blog/topics/user- ... istrators/
- Alexander Riedel
- Posts: 8489
- Last visit: Thu Apr 18, 2024 1:15 pm
- Been upvoted: 37 times
Re: Peculiar behavior
When this happens again, export your code as a script and run that script outside PowerShell Studio. Does it do the same thing?
If so you changed something that broke or disconnected the event handler.
If it doesn't, please email the .pff and the exported script to support@sapien.com and point out which exact event handler you have trouble with. We are happy to check.
If so you changed something that broke or disconnected the event handler.
If it doesn't, please email the .pff and the exported script to support@sapien.com and point out which exact event handler you have trouble with. We are happy to check.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kirunajekr
- Posts: 6
- Last visit: Thu Jan 18, 2024 1:20 am
Re: Peculiar behavior
Cheers, I will do that.Alexander Riedel wrote:When this happens again, export your code as a script and run that script outside PowerShell Studio. Does it do the same thing?
If so you changed something that broke or disconnected the event handler.
If it doesn't, please email the .pff and the exported script to support@sapien.com and point out which exact event handler you have trouble with. We are happy to check.
I don't have time to work on it that often, but will make sure to remember this when I do.
- kirunajekr
- Posts: 6
- Last visit: Thu Jan 18, 2024 1:20 am
Re: Peculiar behavior
I will for sure check a few of the examples out. But limited development-time is why I bought your product in the first place. If I had the time to learn everything about events and forms I would have just had written the code myself instead of having PS Stud generate it for me.jvierra wrote:This is very common while you are learning. It is caused by making changes that you do not realize overwrite other elements. There is no way for us to know exactly what you are doing wrong.
I recommend starting bygoingthrough all or most of the examples in the blog on this site. It is a very good walk-through of how to design and build forms.
Do not try to do very complex things until you understand how this works. Working is evented systems is not like other scripting or other tools/systems. You must learn how the event system dispatches and handles events. Once that is understood you can use online documentation to review how each control behaves.
The edit environment also has behaviors that you will have to learn. It will come slowly at first but you will eventually catch on. The basics cannot be easily guessed at. You really must use a learning tool.
Start here http://www.sapien.com/blog/2013/10/16/p ... oolmaking/
Then here -> http://www.sapien.com/blog/topics/user- ... istrators/