Hi -
I am extending RubyRaiseMan for fun and I noticed that RubyRaiseMan=20
will crash if your try to access an NSArchive file if their are more=20
then two rows of NSTableView data in that file one is fine two will=20
crash RubyRaiseMan.
Now I have extended RubyRaiseMan by adding another NStableView however=20=
now it crashes even if their is only one row of data.
The code executing is very simple - but I am very new to rubycocoa -
This method loads data from a binary archive which was create by Cocoa=20=
using NSArchive and
now will be unarchives using NSUnarchiver..
=A0
Question is Marshal a ruby method and if yes what does it do?
=A0
The problem is as soon as I open such an archive my application crashes
Here is the code as far as I can see:
=A0
##########################
def dataRepresentationOfType (type)
@tableView.deselectAll(nil)
dumped_data =3D Marshal.dump @employees
return NSArchiver.archivedDataWithRootObject(dumped_data)
end
def loadDataRepresentation_ofType (data, type)
dumped_data =3D NSUnarchiver.unarchiveObjectWithData(data)
@employees =3D Marshal.load(dumped_data.to_s)
updateChangeCount(NSChangeCleared)
update_ui
return true
end
##########################
IS this a bug in RubyCocoa or RubyRaiseMan and has anyone seen this=20
before?
Thanks
MrPotatoHead=
|