[plt-scheme] Re: What to augment, how to highlight ?

From: Laurent (Ouaibou at gmail.com)
Date: Wed Oct 17 12:40:56 EDT 2007

Thanks :)

On 14 oct, 14:35, "Robby Findler" <ro... at cs.uchicago.edu> wrote:
> On 10/13/07, Laurent <Ouai... at gmail.com> wrote:
>
> > Hello,
>
> > I have two new questions :
>
> > - Iam making a little text editor. So, i want to get the line-number.
> > In a text%, the method is "last-line" (i use color:text% who has some
> > little more functions). But this only return the value.
> > My goal is to put this number in a message% when an event (keyboard-
> > event, mouse-event, ...) occurs.
> > But i don't find which function i must augment. I thought on-event and
> > on-char, but no. They can only be override.
> > Very few functions can be augment, and none does what i want. Someone
> > has an idea ?
>
> Maybe you want to use text:info-mixin and frame:info-mixin from the framework?
>
> If that's not what you want, you probably should try the
> after-set-position method.
>
> > - My second problem is about highlighting.
> > Iam trying to highlight a text (some keywords). So i think to use a
> > color:text% from framework.ss
> > But i don't understand how to use the "start-colorer" procedure. Some
> > has an example ?
>
> I think the colorer might not be what you want (but I'm not sure). Did
> you look at the highlight-range method? You might also try
> change-style.
>
> Robby
> _________________________________________________
>   For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.