Cocoa, in which I am old fashioned
Aug. 20th, 2009 11:00 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Converting Depth Charge from a Dashboard widget to a native OSX app, to teach myself Cocoa.
I lasted about an hour into learning Objective C. It's not that it's hard, it's that it's so... pointless. It's C, and there are memory management rules, and data types, and I can't be bothered to care any more.
RubyCocoa is pretty much totally integrated. It works with Interface Builder, the IDE gives you code completion (sorta), it is really nice. Plus, since I'm going from Javascript to Ruby the code for the game logic is shrinking a lot. JS is nice for a lot of things, but Ruby's array functions are crazy succinct.
Everything I've tried to do so far has been really easy: making the window and laying out controls in it, wiring them up to the classes, drawing the playing field, loading images, etc. It's going very smoothly.
On the other hand, it still feels icky. I hate that part of my program isn't text. I hate having to drag-and-drop things around to make a UI, it just feels safer to have real code doing it. I mean, I recognize that this is easier... Drawing the window and everything took about two hours total... But I still don't like it. Charles Petzold is still right.
I'm also dying with the horrible crappy indentation that Xcode does. Emacs is so much nicer than this for text editing.
I lasted about an hour into learning Objective C. It's not that it's hard, it's that it's so... pointless. It's C, and there are memory management rules, and data types, and I can't be bothered to care any more.
RubyCocoa is pretty much totally integrated. It works with Interface Builder, the IDE gives you code completion (sorta), it is really nice. Plus, since I'm going from Javascript to Ruby the code for the game logic is shrinking a lot. JS is nice for a lot of things, but Ruby's array functions are crazy succinct.
Everything I've tried to do so far has been really easy: making the window and laying out controls in it, wiring them up to the classes, drawing the playing field, loading images, etc. It's going very smoothly.
On the other hand, it still feels icky. I hate that part of my program isn't text. I hate having to drag-and-drop things around to make a UI, it just feels safer to have real code doing it. I mean, I recognize that this is easier... Drawing the window and everything took about two hours total... But I still don't like it. Charles Petzold is still right.
I'm also dying with the horrible crappy indentation that Xcode does. Emacs is so much nicer than this for text editing.