Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minus jumps to start of @ say get

Status
Not open for further replies.

tilltek

Programmer
Joined
Mar 8, 2001
Messages
298
Location
PH
I have an @ say get that gets a 30 character description from the user.
If the user types a minus sign, the cursor jumps to the start of the input field and replaces the first character that was input.
EG: If they enter "This is number -1" they get "-his is number"
Is there any way to allow the minus sign to be accepted as a regular character?
(FPD 2.6a)

Ken F
 
Hi
Have you defined a ON KEY LABEL - somewhere.
If you have, atleast disable that..
If you are in doubt..just above the @ xx GET ... code.. add the line..

ON KEY LABEL -
This could help you to identify the mystry. :-)

:-) ramani :-)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
Merry Christmas & Happy New Year [bigears] [party] [2thumbsup]

 
Tried it Ramani but it is the same. Hitting either of the two minus keys makes the cursor jump to the start of the input, insert a minus symbol and go to the second character input position.
I checked the ON KEY LABEL and it's blank.

 
Hi
Probably, there has been some redfinition to the Key.. that '-' is taken as Home key.

:-) ramani :-)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
Merry Christmas & Happy New Year [bigears] [party] [2thumbsup]

 
Weird...(I never meet it)
Check DOS KEYB command, free from viruses...
Check not only ON KEY LABEL, but ON KEY, ON KEY = too.
Each user have -/Home confuse ?
Try change keyboard...
Tesar
 
Have you tried inserting a
PUSH KEY CLEAR
into your code to eliminate any unexpected ON KEY declarations?

You can always follow it with any application required ON KEY declarations.

Way back when I had one user (out of many) whose system would behave as though there were a ghost in the keyboard. She would hit a F3 key and all sort of un-expected results would happen. The other user's doing the exact same thing would get the expected program behavior.

In spite of the problem only appearing in a Foxpro application and in none of her other PC applications, she ended up changing her keyboard and the problem went away.

You asked: "Is there any way to allow the minus sign to be accepted as a regular character?"
Yes, you can enter your own
ON KEY LABEL "-" KEYBOARD PLAIN

Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Yes, the minus key is setup to allow one numeric input field to be discounted by pressing the "-" key like this.

on key label "-" do lessdisc

Then there are 7 gets and a read cycle.
The discountable field can be either the fifth or sixth so in the "lessdisc" routine I do this.

procedure lessdisc
if (discount allowed on field 6)

if _CUROBJ <> 6

keyboard &quot;-&quot; plain clear
return

endif
endif
* This works, and the discount procedure doesn't run unless we are in the sixth field.
if (discount allowed on field 5)
if _CUROBJ <> 5

keyboard &quot;-&quot; plain clear
return

endif
endif
* This also works when the input field is 5

* Now the problem product description field
if _CUROBJ = 1

keyboard &quot;-&quot; plain clear
return

endif
* The cursor jumps to the beginning of the field, enters a minus sign and goes to the 2nd character position so that the input &quot;ABCDE-&quot; becomes &quot;-BCDE&quot;.

How do I get the system to put the minus sign in where typed?
Ken F
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top