Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: editor

From: g:santilli:tiscalinet:it at: 29-Jun-2002 14:23

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 <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r