• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Tables in TextView malformed after archiving and unarchiving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Tables in TextView malformed after archiving and unarchiving


  • Subject: RE: Tables in TextView malformed after archiving and unarchiving
  • From: Keith Blount <email@hidden>
  • Date: Fri, 7 Jul 2006 08:42:36 -0700 (PDT)

I've come across this exact same problem myself. I
meant to file a bug on it, but I can't remember
whether I ever got around to it, so it would be worth
doing. Tables work fine if saved as RTFD or RTF, but
if you archive them, they get messed up. I have a
feeling that this may be because the text blocks that
tables rely on were new with Tiger and that there may
be a bug in their NSCoder support - though that is
just a guess and I could be completely wrong. I use a
file wrapper as the file format of my app and store
all the RTFD files within it, which circumnavigates
the problem rather than solving it.

Hope you find a way around it,
All the best,
Keith

PS Just checked and I _did_ file a bug report on this
issue a few months back, though in relation to adding
custom copy and paste support. It is still listed as
"open", so it would definitely be worth logging
another bug report on this.

------------------------------

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 You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: Tables in TextView malformed after archiving and unarchiving
      • From: Douglas Davidson <email@hidden>
    • Re: Tables in TextView malformed after archiving and unarchiving
      • From: Philip Dow <email@hidden>
  • Prev by Date: Re: darken grey NSToolbar
  • Next by Date: more on two-way bindings and one-way bindings
  • Previous by thread: Tables in TextView malformed after archiving and unarchiving
  • Next by thread: Re: Tables in TextView malformed after archiving and unarchiving
  • Index(es):
    • Date
    • Thread