Oma,

Your eep needs to be a bit more intelligent, and keep track of the previous
key pressed.  So, when a user hits a space bar, set a variable telling you
that the previous keypress was space, then when the next key is pressed,
test for the previous key being a space and add the space at this time.

Something like this:

vstring = the string you are assembling

SET VAR vkeypressed TEXT
SET VAR vprevkey TEXT
IF vkeypressed = (CHAR(32)) THEN
  SET VAR vprevkey = 'space'
  RETURN
ENDIF
IF vprevkey = 'space' THEN
  SET VAR vstring = .vstring & .vkeypressed
  SET VAR vprevkey = 'not_a_space'
ELSE
  SET VAR vstring = .vstring + .vkeypressed
ENDIF
RETURN

You can do the same thing with a backspace key if the position just before
the character just deleted is a space.


Emmitt Dove
Manager, Converting Applications Development
Evergreen Packaging, Inc.
[email protected]
(203) 214-5683 m
(203) 643-8022 o
(203) 643-8086 f
[email protected]

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of OmaYahoo
Sent: Friday, June 05, 2009 3:59 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - SPACE ADDED TO A VAR FIELD IN A FORM

Hello everyone!

I have a var field on a form
I have several buttons defined with different alpha characters.
I'm using this on a touch screen!  No keyboard for entry.

I have each entry display as they are entered using the var field.

Like vField = (.vField+.vNewButtonValue)

The one thing I need to do is some times a space is needed between the alpha
characters entered.  The space requirement is random.

I've attempted to define a space button using either ' ' or (char(32))

The var using ' ' does not added a space after the previous button pushed or
the next button after the space button is pushed.
The same for var = (char(32))

I have a work around but it involves using '.' as space 
After completion of the field entry
I replace the '.' with ' '.
vField = (SRPL(.vField,'.',' ',0))  

The users think this is a little strange seeing a '.' instead of a space!

Does anyone have any suggestions?

Best Regards,


Oma Cox
O.C. Services Inc.
P.O. Box 5485
Brandon, MS 39047

662.820.7599
601.992.6785

www.ocservicesinc.com


Reply via email to