[MacRuby] #1223: deploying a doc based app fails
MacRuby
ruby-noreply at macosforge.org
Thu Apr 14 02:03:24 PDT 2011
#1223: deploying a doc based app fails
-----------------------------+----------------------------------------------
Reporter: rob.ista@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords: macruby_deploy
-----------------------------+----------------------------------------------
a xcode4 / macruby 0.10 delivers a working doc based app but after
deploying it, the program doesn't seem to be able to find the NSDocument
class. It just fails to start (although the menubar works and therefor
e.g. the help function) and doesn't recognize the connected doc types
anymore.
some code: (i stripped a few hundreds lines of code :) and SubtitleFile is
a class to convert a subtitle textfile into a table and vv)
class SubtitleDoc < NSDocument
attr_accessor :subtitlesTableView
def windowNibName
'MyDocument'
end
def init
super
@subtitles = []
self
end
def awakeFromNib
@subtitlesTableView.dataSource = self
end
def readFromData(data, ofType:type, error:error)
@subtitles =
SubtitleFile.loadFile(NSString.alloc.initWithData(data,
encoding:NSUTF8StringEncoding))
return true
end
def dataOfType(type, error:error)
data = SubtitleFile.saveFile(@subtitles)
data.dataUsingEncoding(NSUTF8StringEncoding,
allowLossyConversion:true)
end
end
--
Ticket URL: <http://www.macruby.org/trac/ticket/1223>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list