[plt-scheme] Snips and styles in text%

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jun 26 20:02:32 EDT 2003

At Fri, 27 Jun 2003 01:43:56 +0000, "Saint Katsmall T. Wise, Esquire" wrote:
>     (define current-style (send the-style-list basic-style))
> [...]
>       (send snip set-style current-style)
>       (send editor insert snip)

The `insert' method converts the snip's style to a style in the
editor's style list. (This was not properly documented until recently.)

See the `convert' method of style-list<%> for details, but each style
list's basic style has the name "basic", and conversion maps a named
style to a same-named style. So the snip is getting the "Basic" style
of the style list in `editor', which is probably plain.

If I'm on track, then you can avoid the problem by creating a nameless
style for `current-style'. Then it will get converted the way you


Posted on the users mailing list.