Tables in TextView malformed after archiving and unarchiving
Tables in TextView malformed after archiving and unarchiving
- Subject: Tables in TextView malformed after archiving and unarchiving
- From: Philip Dow <email@hidden>
- Date: Thu, 6 Jul 2006 14:25:50 +0200
I have a custom text view to which the user is adding tables. My
customizations do not interfere with the layout manager in any way,
which is the standard manager provided to the text view when being
loaded from the nib. I do not add the tables programatically, instead
calling orderFrontTablePanel: and leaving the rest to the user.
While the program is running changes to the table are preserved
without issue, widths and heights, colors and so on. The user can
switch between entries and each entries' textual contents are loaded
into the text view fine, tables included. The entries are my model
objects. Each has an AttributedString value accessible via key-value
coding. The TextView's attributedString is bound to that key. The
entries are selected from a TableView -- all key-value coding and
bindings.
It works fine until I need to write the entry to disk and read it
back. The process is simple enough. I archive an entry's ivars,
including the attributed string, using a keyed encoder. When the
program loads, it unarchives the values. Now, when the user selects
that entry from the TableView, the AttributedString loads fine, with
all its contents appropriately preserved, except for the tables.
Heights go back to their original values as well as the widths, and
some of the cell border and color settings disappear.
Is there a problem archiving tables that I'm not aware of? Any thoughts?
-Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden