Why can't I save new TextStyles with a project? (was Re: Project saving problems/questions)

Bob Arning arning at charm.net
Sat Mar 31 20:29:58 UTC 2001


Ned,

You will want to look at implementors of #objectForDataStream:. This method allows substitution of one object for another when writing to disk. The assumption in the case of StrikeFont is that there is a lot of data that *probably* exists in the image that will receive the project, so why bother sening it. When the other system does not, in fact, have the named font, the default font will be substituted.

One way you could get around this for fonts not in the general image is to include a change set with the project which installs the StrikeFont via code in the postscript.

Cheers,
Bob

On Sat, 31 Mar 2001 11:30:16 -0800 Ned Konz <ned at bike-nomad.com> wrote:
>I've looked into this a bit further. Even if I set a workspace variable to my 
>new TextStyle (which has pointers to the appropriate FormSetFonts), when my 
>project gets loaded back in, the TextStyle points to "New York".
>
>OK, so I read the class comment for ImageSegment. It says that what gets 
>stored are objects that aren't pointed to by anything outside the project.
>
>I removed the TextConstants entry for my new TextStyle VerdanaZ. I then used 
>the inspector to make sure that nothing outside the project was pointing to 
>it.
>
>But the TextMorph ended up being changed to New York, again!
>
>Is there something odd happening here?
>
>How can I get a local TextStyle stored and restored with a project?
>
>What other kinds of objects is this going to happen with?





More information about the Squeak-dev mailing list