Dear Gabriele,

remove system/view/screen-face/feel/event-funcs

Thanks very much! That's all it took. Now I can use the keyboard and the
buttons and the scroll-bar and never lose the caret. Now the find button
works right. It always searches from the caret position. Before, it began at
the top of the file if it was dirty. I'll keep all the information you gave
in case I run into trouble later.

There's still one thing that's not quite right yet. I have to write a
function to update the slider when I use the cursor keys. I'll try that on
my own. I'm also going to add a delete and a backspace button. And I need
buttons for html tables.

I forgot that the rebol editor is just a file (editor.r). It has some
interesting code in it -- such as keymap. That's how they code the page up
and down keys to move the slider. I think I can get that on my own. I hope!

If I get this perfected, I'm going to take out some of the personal web-page
code and submit it to the script library. I'll post it to my web site first.
Adding buttons should be easy for anyone who wants code with their own
preferences. I don't know what other features would be needed for a good
program editor. All I've heard is color coding the syntax. That's nice, but
I don't miss it much.

Anyway, thanks again!

Sincerely,
Jim

----- Original Message -----
From: Gabriele Santilli <[EMAIL PROTECTED]>
To: Jim Clatfelter <[EMAIL PROTECTED]>
Sent: Saturday, June 29, 2002 5:23 AM
Subject: [REBOL] Re: editor


> Hi Jim,
>
> On Thursday, June 27, 2002, 3:19:07 AM, you wrote:
>
> Sorry for the delay, I've been away from home.
>
> JC> I assume the dirty word means that the text has changed (by means of
the keyboard).
>
> Indeed.
>
> JC> How do I disable this event
> JC> function, as you suggest?
>
> remove system/view/screen-face/feel/event-funcs
>
> You  might want to check for View's version to be sure of removing
> the  right  event func. Also, have a look at INSERT-EVENT-FUNC and
> REMOVE-EVENT-FUNC.
>
> A  different  solution  would  be  to  add an event function to be
> evaluated  before  that  one and that saves the caret position; or
> you could also patch that event func no to call UNFOCUS, i.e.:
>
> >> c: second pick system/view/screen-face/feel/event-funcs 1
> == [
>     if all [
>         system/view/focal-face
>         event/type = 'down
>         not within? event/offset win-offset? system/v...
> >> c/4
> == [
>     fac: system/view/focal-face
>     unfocus
>     do-face fac none
>     fac/dirty?: none
> ]
> >> remove at c/4 3
> == [
>     do-face fac none
>     fac/dirty?: none
> ]
> >> probe pick system/view/screen-face/feel/event-funcs 1
> func [face event /local fac][
>     if all [
>         system/view/focal-face
>         event/type = 'down
>         not within? event/offset win-offset? system/view/focal-face
system/view/focal-face/size
>         system/view/focal-face/dirty?
>     ] [
>         fac: system/view/focal-face
>         do-face fac none
>         fac/dirty?: none
>     ]
>     event
> ]
>
> (WARNING: not tested)
>
> Regards,
>    Gabriele.
> --
> Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
> Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to