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

[REBOL] Re: Input validation routines

From: nitsch-lists:netcologne at: 27-Aug-2003 17:41

Am Mittwoch, 27. August 2003 14:18 schrieb Robert M. Muench:
> > -----Original Message----- > > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]] > > On Behalf Of Volker Nitsch > > Sent: Wednesday, August 27, 2003 8:54 AM > > To: [rebol-list--rebol--com] > > Subject: [REBOL] Re: Input validation routines > > > > Not the validation itself, but a text-feel with hook for keystroke, > > and it can flash. currently used for conference/messenger.
should be used for conference/messenger for a spellckecker.
> > > > i can imagine something like > > number: charset [opt "-" #"0" - #"9"] > > layout[field validate [some number]] > > whould that help? > > Hi, yes that would help a lot :-)) And if we can add a handler that is > called if the pattern is violated (to display a help message) that would > be perfect. Is this 'feel plug-in able into an existin application?
currently callbacks to global words, so only one field. could be made local to field of course. have a look at developer/users/volker/spellck2/spellck2.r i found only this callbacks: spellcheck-trigger?: func [char] [] triggers are space and such, check only finished words. is called on every keystroke. returns true on space currently to check word. spellcheck-last-word: func [string][] is called with the position before the trigger-char so the last word can be extracted. if one files, the field flashes red. look for their call and place your own check there for experiments. rejecting input completely is lacking, but should be easy. do the same check before face/action is called. -Volker