Page 1 of 1

Adding 'kind' to legacy objects?

Posted: Mon Mar 23, 2015 4:53 pm
by trevordevore
Does it make sense to add 'kind' as a read-only property to legacy objects? I am writing code that checks the 'kind' in a mouseUp handler and branches the code accordingly. Right now I have to first test if the target is a widget and then check the 'kind' property. It would be cleaner to just check the 'kind'. I imagine one day I won't have any legacy objects in my project and it won't matter. But during the transition it would make the code a littler cleaner.