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

[REBOL] Re: fields and keyboard

From: rotenca:telvia:it at: 31-Jan-2002 1:37

Hi Brett,
> You confimed my suspicision. As the ctx-text/edit feel object is now, there > is no simple way to extend the functionality. Adding a flag to the face is a > good idea. > > Maybe there should be some special user-defined editing function that can > be called for easy extended functionality.
A little less hack (i use face/user-data for flag): ctx-text/insert-char: func [face char] bind [ delete-selected-text if not same? head face/text head view*/caret [view*/caret: at face/text index? view*/caret] face/dirty?: true ;---changed part--- view*/caret: insert view*/caret either all [ string? face/user-data face/user-data = "--upper--" ][ first uppercase form char ][ char ] ] in ctx-text 'self l: layout [f: field "" with [user-data: "--upper--"]] view l --- Ciao Romano