Is this a bug or a permissions issue when utilizing portions of ignitions API?
A large portion of the snippets on the forum don’t work. Scripting outside of the script builder code from the designers UI is almost unusable. Built ins like event.source.parent are not even able to be parsed correctly.
is there a timeline when this “feature” will be added. seems like a massive limitation.
I can run most of the system calls if I include system in my custom methods but I can’t use .getParentWindow.
Is there a way to pass a valid event object into a custom method that qualifies.
I basically just want to calla custom method that can run .getParentWindow to manipulate its position dynamically.
event.source.newMethod(event) #or event object
#IN custom method
window = system.gui.getParentWindow(event) # or (self) or self.actionPerformed.source
What is the best practice to store a method (at what level) to help avoid this? Or is there a cleaner way to target the parent window so I can move or adjust it without having hard coded paths?
I am starting to think I should just avoid Ignitions custom methods all together and just create and include everything in librarys on a repo at the server level.
I rarely use custom methods. I am a big fan of well-organized project library scripts. I like delegating events to such scripts with one-liners in each relevant event. Pass anything you need from the event context to the library function as arguments.