[personal profile] dmaze
I figured I'd try to write a to-do list manager as a random side project. Tasks should be hierarchical, tasks should have dependencies, data should be stored locally, should have a pretty GUI around the whole thing. This doesn't sound hard, it should be something that I can get a first pass knocked off in about a weekend. Great.

I settled on C++ as an implementation language (I want something type-safe, Debian has no Haskell GUI libraries packaged, I know C++, OO code in C sucks a lot, and I kind of like Gtk). So I sat down and wrote a pretty simple data store for it. Bottom-up design and all that. So now I have a module where I can commit a new data state to it, and undo and redo. Oh yeah, and I wound up writing some basic code to do things like reference counting and callbacks when the state changed. Not hard or long, but it needed doing.

So now I start writing the GUI (using gtkmm) and I discover that I lose: to make a tree view of my hierarchical tasks, I either need to copy all of my data (eew) or write a custom TreeStore. There is no documentation for the latter. And the only way I can pass my store into the TreeView class is via a smart pointer...in the Glib reference-counting system...which is different from mine.

My options are now to either tie my data store into Glib (yuck), figure out how to write the custom tree data store object in C and tie it in (more yuck), figure out how to make my adaptor object Glib-refcounted (possible, I suppose, but TFM is pretty unhelpful). Or learn OCaml, or figure out how to compile and install gtk2hs. The last is increasingly sounding like a better use of my brain cells...
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Profile

dmaze

Expand Cut Tags

No cut tags
Page generated May. 28th, 2025 08:50 pm
Powered by Dreamwidth Studios