Prevent Crash when Attribute Message Contains Wrong type?
Hi,
Sorry for the flurry of posts. My project is making huge progress and I'm able to tidy up some of these details. Question of the moment:
How do I prevent Max from crashing if someone send my external an attribute message of the wrong type. Example in Min Devkit:
attribute<color> textColor{ this, "textColor", color::predefined::black, title { "Text Color" }
If someone sends this message to my object:
textColor "Definitely not a color"
max will crash immediately.
What's the safest way to implement color attributes in Min so my users don't kill Max if they send a bad message to the object? Thanks!
I figured this out. Apparently min doesn't like Camel case for attribute names.
I changed my attribute name from textColor to textcolor and I get the expected behavior now. Wild! But at least I can sleep tonight.