Hi! 

I need to serialize and deserialize a TextBuffer for a project. But it
doesn't work. When serializing the TextBuffer and write it in a file, it
give me a file with only zeros.

The code:

BinaryWriter bw = new
BinaryWriter(File.Open("myfile",System.IO.FileMode.CreateNew));
byte[] data =
noteView.Buffer.Serialize(noteView.Buffer,Gdk.Atom.Intern("application/x-gtk-text-buffer-rich-text",true),noteView.Buffer.StartIter,noteView.Buffer.EndIter);
bw.Write(data);
bw.Close();

Does anyone have an example? I'll be happy ;)

++




_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to