Hi Thorsten,
You could just use a timer event on the info style:
view layout [
i: info rate 0 feel [
engage: func [f a e] [
if a =3D 'time [
l: length? parse m/text none
i/text: join "Wordcount: " l
show i
]
]
]
m: area
]
HTH :)
- Nick
Quoting Thorsten Moeller <[email protected]>:
>
> Hi,
>
> i am just writing a small editor for myself which should have a realtime
> wordcount. Simplified i have following situation:
>
> editor: layout [ mytext: area ifo: info btn "Close" [unview]]
>
> view editor
>
> I am not too familiar with events in rebol. From the docs i learned that
> i have to change the area definition to something like the following to
> make the area react on key events:
>
> mytext: area feel [
> engage: func [face action event] [
> if action =3D 'key [mylen: length? parse mytext/text none
> =09=09=09 ifo/text: join "Wordcount: " copy to-string mylen
> =09=09=09 show if
> ]
>
> But just adding the feel to the area doesn't work.
>
> What am i missing??
>
> Thorsten
>
>
> --
> http://www.fastmail.fm - IMAP accessible web-mail
>
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.