[REBOL] feel engage not 'feeling' to well......
From: jfdutcher1958::yahoo::com at: 16-Jun-2004 17:46
Here is an example of attaching a 'feel' to a field.......
The 'return event' is over used of course....but I'm groping for an alternative.
The one line, and only line, that actually 'works' religiously' ?? is the test for digits
...
(if not find "0123456789" ch [alert "Only digits can be
entered" return none]
How to get the other events to actually pass through and be 'processed' ???
style numbox field 30x30 font [size:35]
feel [engage: func[face action event] [
print event/type
if event/type = 'key [
ch: event/key
if ch = 'left [return event]
if ch = 'right [return event]
if ch = #"^-" [return event]
if not find "0123456789" ch [alert "Only digits can be
entered" return none]
return event
]
return event
]
]