Jason,

The answer to your question is yes.
I checked my on key press eep and it handles spaces just fine.

Jan
 


-----Original Message-----
From: Jason Kramer <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Mon, 05 Apr 2010 16:30:53 -0400
Subject: [RBASE-L] - Re: ON KEYPRESS question

Dear Albert, Razzak, and Jan,
    Thank you for writing back.  I had some non-R:BASE things to work on so 
it took me until this afternoon to try your suggestions.
I am using 7.6.8.30331.
I'm pretty sure that NULL is set to NULL, not space.  How would I check to 
be certain?
I was already doing something similar to SET VAR vMyVar =  
(.vQuotes+.vMyVar+.vMany+.vQuotes) because I was basing my form on the 
OnKeyPress sample Razzak mentioned.
    I finally found my problem, but I can't come up with a solution.  I have 
a RECALC VARIABLES in my EEP, and this causes the cursor to jump to the 
beginning of the VE and drops the last space.  I have the RECALC VARIABLES 
in there because if the users enters a search string that will result in 
only one possible value for some Variable Lookup Combo Boxes, then I set 
them and and also set a check box to show they are in use.  If the user 
deletes some characters from the search box VE such that there are now 
multiple possible values in the VLCBs where there was previously only one, 
then the check boxes are cleared, and the VLCB is nullified to reflect that.
    I don't know if my explanation above made sense, so if not, let me know 
and I will work on it, and add an example.
    So my question now is, Is there a way to use a VE with an On KeyPress 
EEP and handle situations where there is a space in the input, and there is 
a need to recalc variables during the input?
                                                Thanks,
                                                Jason

Jason Kramer
University Archives and Records Management
002 Pearson Hall
(302) 831 - 3127 (voice)
(302) 831 - 6903 (fax)

On 4/1/2010 7:08 PM, Albert Berry wrote: 
A thought, Jason - do you have NULL set to a space while the form is in use? 

Albert 

Jason Kramer wrote: 

I am trying to write a form that will display a steadily refined list of 
names.  I have a variable edit and a variable lookup list box.  As the user 
types in a name I wan the list in the list box to update by dropping all the 
invalid names.  For example, if my list of names is: 

John Doe 
Jason Kramer 
James A Garfield 
James Joyce 

And the user types J, nothing will be changed, but if the user types Ja, 
then John Doe should be dropped.  The problem I am running into is when the 
user gets to the point that there is a space in the name.  After the user 
types a space, the cursor jumps back to the first position in the Variable 
Edit and the trailing space is dropped.  So far the only way I can find to 
work with a space is to type the first and last name together (JamesJ) and 
then go back and add the space (James J).  The is probably not going to go 
over well with the end users. 
    I am currently using an ON KEYPRESS EEP that starts by getting the 
TEXTVALUE of the variable edit and putting it into a variable (GETPROPERTY 
vesearchbox TEXTVALUE vmyvar) and then using vmyvar to refine the list: 
SELECT COUNT names INTO vnamecount FROM mytable WHERE fname = .vmyvar. 
    Does anyone know of a way to handle a name (or other string) with a 
space in it and retain the space using ON KEYPRESS?  I can rewrite the form 
so that the search limit is entered and then a button (or an on exit EEP is 
fired) to trigger the search, but I thought that a slicker implementation 
would have the list being refined automagically (at least as far as the end 
user is concerned). 

                                                    Thanks, 
                                                    Jason 
-- 
Jason Kramer 
University Archives and Records Management 
002 Pearson Hall 
(302) 831 - 3127 (voice) 
(302) 831 - 6903 (fax) 

Reply via email to