Archive for June, 2009

(overly simplistic) saving state in oF for iPhone

Friday, June 19th, 2009

save_stateThere was a recent comment about saving / restoring application state when using openFrameworks for iPhone which got me to thinking about how to do it. Apple’s frameworks provide a fairly thorough way to save state to the disk and restore later. There seem to be three primary ways to do this: simple plist files (usually encoded in binary on the iPhone), archived data (they like to refer to this as freeze-dried object graphs) and core data.

I believe that archiving objects require methods inherited from NSObject, which we don’t have in openFrameworks’ ofSimpleApp. Core Data seems like overkill, so I looked into using plist files.

There are likely better ways to do this, but this ad-hoc solution works wonderfully for a small app I’m working on, and only requires a bit of Objective-C code that could likely be moved up into a nice wrapper class. However, since the question was asked I’d just like to get it out there before working on a more elegant approach. (more…)

coda

Friday, June 19th, 2009

i recently switched to Coda for web development. now, i don’t do much web dev any longer…mostly for myself (as evidenced my this latest overhaul of robertcarlsen.net – which amounts to theme hacking, really). i never had a problem with tabbing through several programs to get the job done, but i like Panic’s style.

the interface is clean and with keyboard shortcuts for each of the view modes. i do so wish for more info in the files panel….i’m used to comparing modification times and the sync features of full-fledged FTP clients.

anyway, it’s good software – and i’ve come to really appreciate good software lately after writing a lot of bad software myself.

update and migration

Wednesday, June 17th, 2009

i’ve updated the site’s design and will be migrating it to a new server over the next couple of days. in the meantime, please forgive any oddities (but feel free to let me know about them – i’m currently dealing with the code examples formatting right now).

also, all the old permalinks are dead and i need to fix that.

openFrameworks knitting circle

Wednesday, June 10th, 2009

Had a really nice time tonight at the oF knitting circle held at Parsons in NYC. Saw several really inspiring projects and spoke to several people about using openFrameworks for iPhone development and showed the current version of the particle game using ofxiPhoneAlertView.

Quite a few folks mentioned that they have become interested in openFrameworks after hearing about it’s use for creating iPhone applications. While not every app is suitable, I saw a few really nice examples. My only regret is not getting the name of the fellow who was working with creating a sound wrapper.

The wiki page for the knitting circle is at the openFrameworks wiki.

ofxiPhoneAlertView

Wednesday, June 10th, 2009

Here is a (really) basic wrapper for the UIAlertView in openFrameworks of iPhone. Not all of the necessary delegate methods have been implemented yet, but this is enough for me to get the proof of concept rolling in an app I’m building.

Feel free to let me know how I can do things better, or just tinker with the code directly at github: ofxiPhoneWrappers

Check out the example project. This is a bit of a kludge. I would like to figure out how to avoid having to declare main and testApp as mixed source files (.mm). It works for now, however.

Here are the notes on using the class: (more…)

BarCampNYC4 presentation

Wednesday, June 3rd, 2009

BarCampNYC4 was hosted by ITP on May 30-31st. It was a great event – I’d highly recommend going to another one.

I did a presentation titled “Using openFrameworks for iPhone App Development” which I think went well, although it was quite dense. Can’t be helped, I suppose. The walk-through of getting set up with openFrameworks has been previously posted, and is also available on ITPedia. Below is an embedded video of the presentation thanks to Mark B… and New Work City. (more…)