In this chapter we continue to advance in the creation of a cross-platform native application for the management of personal expenses; And we do it by introducing the concept of Classes! Without a doubt, one of the fundamental pillars of Object Oriented Programming (OOP).
Before continuing, I recommend that you re-read the previous chapter of the course to refresh all the notions learned so far, and also to check where we left our application.
In this chapter we will start by dwelling on how to solve the problem related to the pressure (clicking with the mouse cursor) on the headings of the list (remember that it is the ListBox control), and where we have seen that the sorting of the rows was not performed correctly when the data are numerical.
You will see how easily (and using a few lines of code) we can indicate that a custom ordering system is used when the values to be displayed from the ListBox are numbers. As an added benefit, you can apply the same code and technique to any other ListBox control you want to use in your applications.
However, what's really important is what comes next in the video: the Classes. Think of them as the building blocks of object-oriented programming. And, once you've created a class, you can reuse it in as many applications and projects as you need - you program a certain behavior once and you can use it without having to rewrite the code.
In fact, much of what we've seen and used in previous installments are classes! From the UI controls we use in window design, to data types like, for example, String.
As we take the first steps in creating our first class in this installment, you will also gain a better understanding of how dot notation is used. Likewise, you will also learn how we can create new objects (also called instances) from the defined class.
Pause the video accompanying this chapter, understanding each step, and try to reproduce later what you saw for yourself; Or create your own project from scratch that uses at least one class defined by you.
Remember that you can always download Xojo from: www.xojo.com/download, as well as express your concerns in the Xojo Forum in Spanish (https://forum.xojo.com/c/international/espanol/31).
If you have any questions about how to do something about Xojo, don't hesitate to leave a comment!
Get 20% off the purchase of any version of Xojo, leaving a comment on this news, explaining what you will use it for.
Our Customers nove coupon, which will be distributed in order of comment.
Promotion valid until the end of April