class MyDocument < NSDocument
attr_accessor :dummy
def init
super
setDummy({"name"=>"dummy"})
puts "in init class of Hash is : #{@dummy.class.ancestors}"
return self
end
def windowNibName
'MyDocument'
end
# Document data representation for saving (return NSData)
def dataOfType(type, error:outError)
puts "in save class of Hash is : #{@dummy.class.ancestors}"
return true
end
# Read document from data (return non-nil on success)
def readFromData(data, ofType:type, error:outError)
return true
end
# Return lowercase 'untitled', to comply with HIG
def displayName
fileURL ? super : super.sub(/^[[:upper:]]/) {|s| s.downcase}
end
end
bindings works, but when i try to save the document...