Logger-TXT OSX Dev Diary #1 - Diving into Objective-C
With some free time that has presented itself in the past month, I've decided to clear a few things off my back burner that have been nagging me for a while. One of those things was to learn some Objective-C in order to create OSX and iOS counterparts to my Logger-TXT script. Not everyone enjoys interacting with shell scripts all day so a nice GUI has been a long time coming. Though mobile is a pretty big logging hole at the moment, I figured an OSX app would be an easier place to start.
This is my first foray into Objective-C so, over this past weekend, I sat down and got familiar with the syntax using Apple's "Start Developing Mac Apps Today" series of articles. Though it took most of the weekend, it was a good crash course in how Objective-C works and general coding patterns. Definitely transformed my Objective-C experience from being lost in the dark to at least being able to find the walls.
The whole premise of Logger-TXT is pretty simple; it's just a text file with a single entry per line with a specific format. It's just really simple file handling so I've found it's a great project to get started in new languages and environments.
Eventually this small OSX utility will exist as a menu bar app that is opened quickly using a global hotkey. You should be able to call up the input window, enter your item, and then be gone within a few seconds.
There will also be a "recent" view allowing for some searching and light editing of your log file. Overall it's pretty simple but I'm aiming for a quick and easy to use UI that aims to accomplish it's task and then gets out of your way as quick as it came.
Dealing with status bar apps was a bit over my head at first so I figured I'd get it all working in a normal window and then, once it's functional, work on moving it to the menu bar.
As you can see below, it's a pretty ugly interface at the moment using all just the default styles from Interface Builder. At a later stage, once functionality is there, I'll work on getting it to look pretty and less "stock."
As of right now, it writes to a static log file formatting the entry to match the needed output:
Soon, focus will be turned to creating the "Settings" window so that I can get the file path set by the user and any other settings like "Launch at log in."
It's been an interesting journey so far. It's always a bit frustrating and slow when learning a new language but at the same time, the progression feels awesome. I'm aiming to put up posts like this every few days to externalize the progress and hopefully get some eyes on it while it's in development for feedback.
Existing UI's For Inspiration
Below are a few other menu bar apps that I have installed that make use of a popover similar to what I was envisioning. If you have any others please share them in the comments below! I'd love to get some more inspiration for how this could look in the end.