« Ahem... | Main | This is for Matthew McCleary »

January 14, 2005

Cocoa, the Horror

Allan asked me to write him a simple Cocoa status menu (he wanted a menu extra, but that’s fairly non-trivial). He wanted something pretty simple: the ability to add a handful of times to a menu, pick one to be on top, and have them all be in different time zones potentially with different format strings (which he also wants to be able to customize).

Now that I type it all out, it’s not sounding as easy, which makes me feel better. He actually had a laundry list of things to put up there on top of that stuff. Some twat made a menu that he doesn’t want to have to pay $20 for, that does most of the stuff he wants but also does a lot of crap he doesn’t care about. I might be convinced into enjoying a timepiece with the time in various different locales, but I wouldn’t call it a pressing need.

Anyway, I bring it up because of what a difficulty Cocoa has been. I don’t mean to turn anyone off of it, but it seems to be one of those things that feels easier than it really is. I haven’t done much with it since a month or so before the laptop broke. Now that it’s back I feel somewhat obligated to use it, because it’s a luxury environment and living without it was terrible.

Anyway, I knocked together a plain text editor which counts words for Alex, and that was a snap. It took about an hour to do the whole thing, including loading and saving, printing (though I don’t have a printer to test it with), multiple documents and the works. Here’s a screenshot:

By the way, if you’re a cornhole, you may notice that I’m ignoring the Apple Human Interface Guidelines by not having margins. I don’t really agree with the new trend but I wanted the app to work and look like TextEdit.app, so I just copied what it does. No margins in TextEdit, no margins here.

There’s no question that the word counting app for Alex is much more sophisticated than what Allan wants. What Allan wants would be easier if I had to write all the code that manages windows, document associations, etc, by myself. I don’t, and that’s great, but now I’m struggling to write Allan’s thing, which isn’t particularly sophisticated. Also, I’m having trouble with the Cocoa Bindings, because I want to bind to a list of time zones, and they’re coming as an array of strings from a class method rather than an instance method, on NSTimeZone. So I wonder if I’m having to do extra work? Maybe I should post to the Cocoa-Dev list finally, after all this time I’ve spent lurking. If I can’t figure it out tomorrow, I think I will.

Posted by FusionGyro at January 14, 2005 11:27 AM

Trackback Pings

TrackBack URL for this entry:
http://www.clanspum.net/~fusion/blog/admin/mt-tb.cgi/81

Comments

Post a comment




Remember Me?

(you may use HTML tags for style)

Want HTML? Use Textile instead.