[MacRuby-devel] Document-Based Application Issues

Mike Leonard mikeleonard at gmail.com
Tue Jul 13 09:32:00 PDT 2010


Hello all,

Apologies if this is really obvious; my background is mainly in Ruby, though I do have some experience developing a Cocoa document-based app.

Anyway, I'm trying to create a document-based application from the MacRuby template. Things started out well, but I hit a snag when I tried to get my app to actually open files. When I do File > Open, an NSOpenPanel pops up as expected, but after I select a file I just get a dialog telling me that the file could not be opened. In fact, the "readFromData(data, ofType:type, error:outError)" method never seems to execute at all.

I'm sure this is something simple. I've basically been trying to apply the techniques in Apple's "Building a Text Editor in 15 Minutes" document to a MacRuby document-based app. Do I need to subclass NSDocumentController or something?

Thanks,

Mike Leonard


More information about the MacRuby-devel mailing list