I'm going out of my mind with stuff to do, which usually means I take on yet another project, if only to make sure I take a little time for myself.

This time, that's a personal budgeting application made in RealBasic, and boy, does RealBasic have some pokey edges. One is the way that you can extend UI objects. It's insane. You can't make up your own object type, like in Java where MyFancyFrame might extend JFrame and provide a few new methods. Instead, you can extend the objects by creating new methods that act like the belong to the UI object from the start, but, and this is the important part, you can't actually put the methods on the UI objects themselves.

Instead, you have to declare the methods in a stand-alone module and ensure that the first parameter is the type of object that it should act, but only act, like it's attached to. So if I want to override the way a cell's rendered in a Listbox (as partially described in this thread and this thread before it, I have to create a module -- let's call it mdlExtensions -- insert the method I want to tack onto the Listbox -- we'll call that PopUpCellChoices -- and have a line like this for params:

extends lb As Listbox, row As Integer, column As Integer, astrChoices() As String

When I actually call the method, which is, again, sitting in its own module, as I might from my Listbox's CellClick event handler, I do it like this:

bOut = me.PopUpCellChoices(row, column, astrChoices)

That's right... it's not mdlExtensions.PopUpCellChoices, but Me., though the method is nowhere near me. In that method, however, "Me" is gone. It's all lb. All I did was obfuscate that I sent "Me" in as lb the Listbox.

Why don't I just call mdlExtensions.PopUpCellChoices(Me, row, column, astrChoices) I have no idea.

In other news, RealBasic's POP3Socket's MIME parsing ability is exactly zero when it comes to UTF-8, which sorta stink0rz. Still, I think I'll shell out for the Personal edition this time. I've been testing RealBasic for years, since OS 9 (maybe before?), and there really isn't any way to create a crossplatform codebase that acts native and has an embedded, SQL-literate database as quickly. Java's great, but I've finally given up on its being a good way to make a app for the masses. RealBasic can apparently even make it to the Mac App Store, so I think I'm going to code up one The Wrong Way (not ugly, just not up to my normal standards of overengineering) and see how difficult it'll be to publish.

Should be [mostly] fun, anyhow.

Labels: , , , ,