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
'MyDocument'
end
def init
super
@subtitles = []
self
end
def awakeFromNib
@subtitlesTableView.dataSource = self
end
#
# 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
end
#
# 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)
end
end
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel