Closed ImJimmi closed 5 months ago
For context, this breaks a lot of stuff in JIVE because the styling API sets a "style-sheet"
property on the component, but when that property is displayed in the inspector, the property is converted to a string and so the actual style-sheet object is destroyed.
In this case, the text on the buttons can no longer retrieve their correct font colour as their style-sheets are destroyed:
Thanks for both the fix and all the documentation! Back from vacation and this is on my list to look at next!
Thanks for the contribution!!
Fixes a bug where Component properties with Object values would get turned into strings due to the use of
juce::TextPropertyComponent
and shared values.To reproduce:
juce::Component
.juce::ReferenceCountedObject
, e.g. ajuce::DynamicObject
)."Object 0xabc"
This is due to how
juce::TextPropertyComponent
usesjuce::Value
- when it goes to display the value, it sets the text of it'sjuce::Label
to the stringified version of the object. This causes a listener-change callback in thejuce::Value
that the label refers to which causes the underlyingjuce::var
, originally in the component's properties list, to also be turned into a string.The proposed solution here is to simply make a copy of the stringified value if the value is an object type.