Could anyone either explain to me, or, point me to a resource where I can get information on sub classing.
I often hear people talking about it, but am not exactly sure what it is or why it is needed?
My understanding is that it acts similar to the standard controls available in Xojo, but with subtle differences.
I want to understand this properly, as I feel I am missing out on making things easier for myself.
Thank you all in advance.
A subclass is created by taking an existing control such as a TextEdit field and creating a custom version of it… This custom version inherits ALL of the behaviour and properties of the original control, giving you the developer the ability to over-ride (or over-load them… over-load is a subject for another discussion ).
See this topic for a simple example of how to create a TextEdit subclass that will only allow uppercase characters (yes… that CAN be done with a mask…but it is still a good example).
I have a project with a custom textedit that can be set to accept only letter, or only numbers, or must have a valid social security number, or email address etc. This way I don’t have to code those functions up each time I need them… I just import the custom class code… and off I go
Thank you Dave - much appreciated.
Did you look in the PDFs on http://documentation.xojo.com ?
especially in the new books?