There are a lot of very skilled Xbasic programmers in the Alpha Five developer community, but not many developers are using Xbasic Classes. Xbasic classes are a powerful way to improve your code. We recently made Xbasic classes easier to use by allowing you to define your own namespaces. We also made improvements to the way classes can inherit from a each other.
For example, in the somewhat contrived example below we can see two class definitions. The second class inherits from the parentSays class. Both classes are defined in the DEMO namespace. As you can see, the 'sayWhat()' method of the child class calls the 'momTalk()' method of its parent class.
Interested in mentoring to buff up your Xbasic skills? Please contact firstname.lastname@example.org
define class DEMO::parentSays
dim phrase as c = "Listen to your parents."
function momTalk as c()
ui_msg_box("","momTalk:" + phrase)
define class DEMO::childSays INHERITS DEMO::parentSays
dim kidSpeak as c = "My mom always says:"
function sayWhat as c()
'call the parent class method