[MacRuby-devel] Deploying a macruby document based app

Rob Ista MM rob.ista at me.com
Sun Apr 10 00:59:46 PDT 2011

Hi all, 

My document based app runs fine on a mac with the framework installed (macruby 0.10, xcode4) but macruby_deploy seems to fail in building a working app. I think i have implemented all the required overrides, but obviously i am overlooking something Ofc i did set the class in the plist. 

teh messages i get is: 
"No document can be created" when i start the deployed app

Also when i choose open, the documents of the appropriate types cannot be selected

And: trying to select one from the "Open recent" goves the message " .. cannot open files in the "xxxx" format" 

plz give me some clue's if you have any :)))

cheers, Rob

Some code: 

class SubtitleDoc < NSDocument
	attr_accessor :subtitlesTableView, :oneall, :from, :to, :scan, :replace, :errormessage

	def windowNibName
	def init
		@subtitles = []
	def awakeFromNib
		@subtitlesTableView.dataSource = self
# read file to raw data and convert to table of subtitles
	def readFromData(data, ofType:type, error:error)
        @subtitles = SubtitleFile.loadFile(NSString.alloc.initWithData(data, encoding:NSUTF8StringEncoding))
        return true

# convert table of subtitles into raw data and return it to filesystem
	def dataOfType(type, error:error)
		data = SubtitleFile.saveFile(@subtitles)
        data.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion:true)

More information about the MacRuby-devel mailing list