I’ve created a custom paint class that paints a background from specific variables and added this to my InstallationNodeView.
I wish to use inputFields In URSim that sets the input values to my variables and then repaints the background.
The problem is that I don’t know how to connect my custom class to the InstallationNodeContribution and retrieve the input values.
Is this possible or do I have to write all code in InstallationNodeView?
My project is starting to get quite big with allot of code, so making custom classes/nodes would allow better structure and readability.
Thanks In Advance!
You should be able to just declare and initialize an instance of your custom class. If you’re using eclipse, it should underline it in red and when you hover over it, it should offer to “Import” your custom class.
If I have a custom class called “ViewCreator” I can declare it within the installation view like this:
And initialize it with your class’s constructor like this (I do this inside the BuildUI function because I use the node’s contribution inside my custom class):
Now anywhere inside the installationView, I can type “viewCreator.” to see a list of all the functions/variables that I have access to through this custom class.
First of all thanks for your response and for taking your time to answer my question!
This is great! Now I’ll be able to write my URCap project with better structure and make it easier to read, without scrolling through multiple lines of code…