Say you have code like this.
a := 100.00
@ 1,1 DCGET a PICTURE '@K 999.99'
In clipper, if any key is entered other than cursor keys, the field is cleared out prior to accepting the entered characters.
However in Xbase++/Express++, it works slightly differently. If the user enters .50, the field becomes 100.50, versus .50 for clipper. If they enter 0.50, the 0 causes the field to be first cleared and then the rest of the data is taken, resulting in 0.50.
Is this how it is supposed to work with Xbase++/Express++ and if so, is it possible to get a configurable get/set option that allows it to be one way or the other. I just ran across this today during some testing and a user commented on its behavior of a module finally moved from clipper to windows.
Cliff.
@K in picture clause and enter of ".", decimal point first
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: @K in picture clause and enter of ".", decimal point first
Cliff -
It's been working this way a long time.
I want to be careful not to break anything to give you the behavior you want, but I will look into it.
Roger
It's been working this way a long time.
I want to be careful not to break anything to give you the behavior you want, but I will look into it.
Roger
The eXpress train is coming - and it has more cars.
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
Re: @K in picture clause and enter of ".", decimal point first
Hi Cliff,
i found this problem years ago, but Roger didn't want to change this...
My solution was to mark the get in the SetInputfocus-Slot
With this, you have a nearly equal behavior like in clipper.
i found this problem years ago, but Roger didn't want to change this...
My solution was to mark the get in the SetInputfocus-Slot
Code: Select all
if valtype(o:getdata()) == "N"
o:setMarked( {1, o:bufferLength+1 } )
endif
-----------------
Greetings
Markus Walter
Greetings
Markus Walter
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: @K in picture clause and enter of ".", decimal point first
I know it has been working this way a long time. Never really noticed it. The user did because in payables, they have a vendor with alot of < 1.00 distributions. That is why, if it could be done, it would be via something like Markus suggested, but via a get/set function so you do not break existing behavior. Just a thought. Or the user has to get used to typing in 0.16 instead of .16 for the process. It is just that they are still using the clipper app for the last few remaining options so they trained on clipper behavior.
I will experiment with Markus's suggestion.
I will experiment with Markus's suggestion.