[plt-scheme] Snips and styles in text%

From: Saint Katsmall T. Wise, Esquire (kela_bit at netvision.net.il)
Date: Thu Jun 26 23:51:03 EDT 2003

Matthew Flatt wrote:

>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
>expect.
>
>Matthew
>  
>
How do you create a nameless style?
Would you (make-object style%) or something like that?

Katsmall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20030627/1f5c9061/attachment.html>

Posted on the users mailing list.