A bug in PropertyPanel?

Hi there;

I have a PropertyPanel and two different sets of PropertyComponent Array<>s. I want to display the related set of properties upon the users’ choice. However i get an acces violation when switching between sets. Actually the error occures when switching back to the set that has been set before.

Here is a code fragment that produces the violation:

PropertyPanel m_PropertiesPanel;
Array<PropertyComponent *> m_MulticastProperties;

m_PropertiesPanel.addProperties(m_MulticastProperties);
m_PropertiesPanel.clear();
m_PropertiesPanel.addProperties(m_MulticastProperties); // Crashes...

Thanks for the consideration.

well yes… if you read the comments for addProperties(), you’ll see that it takes ownership of the objects you give it, so it’ll be deleting them when you clear it.

Ok;

Thank you for the reply jules.

I will use a different Panel for each of my set then.

No need to do that - you could just create some new property objects and pass those in. That’s the way I’d expect it to be used.