Adding 'kind' to legacy objects?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 993
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Adding 'kind' to legacy objects?

Post by trevordevore » Mon Mar 23, 2015 4:53 pm

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.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “LiveCode Builder”