Sunday, 24 February 2008

MoneyLounge gets a Drawer


To the right is the latest screen shot of MoneyLounge. Progress has been somewhat slow over the past 10 days but a few enhancements have been made. The most visual addition has been the implementation of a Drawer, to the right of the window. When you click on a transaction the drawer opens upon allowing you to edit the details of the transaction. For example you can change the Payee from "Woolworths" to "New World" or the amount. You can also add and remove accounts. Most importantly I've made some changes to the way that the data is stored. Since I'm new to Mac development I've been developing MoneyLounge with a very much iterative prototyping approach, and I have hit a few roadblocks that have meant that I've needed to alter the underlying classes and data structures. Hopefully now everything is in better shape and this should speed up future work. As always the biggest problem has been memory allocation and trying to debug segmentation faults and core dumps. I still haven't got my head around this aspect of Cocoa development yet and am debugging with a trial and error approach.

Wednesday, 13 February 2008

MoneyLounge, 9 days old


MoneyLounge is now in development. After several weeks swatting up on Objective-C and Cocoa development I've kicked the project off and have managed to put together a very simple interface with some limited functionality. So far I can import .QIF account files, load and save data and scroll through accounts, transactions and categories. Not too bad a start, given it's only been 9 days so far. I was a little worried about how I was going to store all the data, but Objective-C supports a quite robust class archiving and encoding protocol, that allows you to very easily store an object-graph directly to disk. This means that assuming you've followed the flavor of Object Oriented Design encouraged by Objective-C, i.e. wrapping all data in classes, then load and saving the data stored in those classes is quite trivial. My one big headache so far has been memory allocation. Objective-C doesn't do background garbage collection for you and it's system of object retention is a little confusing for someone like me. I've been developing in languages like PL/SQL, PeopleCode & Powerbuilder for a few years now and allocating memory and cleaning up objects is something you just don't have to worry about. I've also found Objective-C to be somewhat verbose. To append one string to another string and assign it to another string in most languages you'd use something like:
s1 = s2 + s3.

In Objective-C that becomes:
s1 = [[s2 stringByAppendingString:s3] mutableCopy];

Still, you get used to it. The screen-shot attached to the blog is NOT some sort of early, primitive GUI design for how the final application will look. It's simply a bunch of text views to allow me to check that data has been loaded correctly. If this thing ever gets finished it'll be fun to look back at how the application looked when it was nine days old.