There’s little we can do without seeing the code.
But it seems that you are sharing the same IGH_Attributes instance between components (copies, maybe?) or some field of it. Or maybe you overridden some functionality incorrectly.
Are you doing this in the GH_Component?
void CreateAttributes(){
m_attributes = new MyCoolAttributes(this);
}
Static fields do not belong to the instance but to the class, so you are accessing the same space in the memory from different instances. To access the GH_Component from the attributes, you can use the Owner property and convert it to your data type, or create a field within the IGH_Attributes.
Something like:
public class MyAtt : GH_Attributes<MyComp>{
MyComp comp;
public MyAtt(MyComp owner) : base(owner){
comp = owner;
}
}
Hi Shimpei, just curious if you would be willing to share your source code, at least the GUI drawing and interacting portions?
I’m sure there are quite a few people around (myself included) who would like to develop simple plugin components with buttons and checkboxes, and would be really grateful for a reference implementation to save the trouble of figuring it out from scratch
(And also it would be much easier to help you to troubleshoot)
Thanks - I’ve read that forum link before, but the example given there was somewhat rough around the edges -
I was perhaps hoping for a more complete copy-and-paste implementation especially for the radio buttons, without having to dive into learning GDI drawing syntax