I have created a custom GH_PersistentParam with its own GH_Attributes. It cannot receive any input and I have put a couple of “buttons” on it for the user to select from dropdown menus. The text in the “buttons” is updated after the user choice, it is stored in string variables which I manage to save through the Read() and Write() overrides of the parameter.
I have also implemented the mouse button event handler to call something like:
The arguments that I pass are based on the above mentioned strings and create the object as required. I thought I could use a similar approach and call:
and I thought I could do this in the Read() method. But this doesn’t seem to work. I notice that the persistent data in the parameter seems to be actually created from the custom class constructor but without arguments, so I assume this is happening somewhere else?
In an old thread I read that the method Read() is called every time a file is opened or the component pasted on the canvas, so I thought it could be the right place to do it.
I am not sure what you mean by “before or after I call the base class Read() method” though. As said above, I am not really calling it myself, I understood it gets called automatically.
EDIT: I just realised you may be refering to the base.Read().