Recent

Author Topic: MaskEdit is jumpy  (Read 5729 times)

Middlecope

  • Jr. Member
  • **
  • Posts: 92
MaskEdit is jumpy
« on: September 20, 2018, 04:03:59 pm »
OS Linux OpenSuse Lepa 15
Lazarus 1.8.2
FPC 3.0.4
Widget Type gtk2
Mask 99-99-99;1;_
After the last update to 1.8.2 The MaskEdit is very difficult to fill. I should be very slow and wait otherwise the position of the cursor
will jump 1 position.
Before I did not have that problem!
Any idea what can be wrong?
Thanks Teunis :o

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: MaskEdit is jumpy
« Reply #1 on: September 20, 2018, 07:18:04 pm »
No serious changes to TMaskEdit have occurred in the last months.
Maybe widgetset related?
If you build for QT, do you have the same problem?

Bart

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #2 on: September 20, 2018, 08:40:34 pm »
I rebuild the LazarusIDE with  Quty. And it gives the same result.
Even in properties (F11) of MaskEdit1 If I tryout the mask it is jumpy.
Should I change the mask? I am using it for date entry (dd-mm-yy)
Thakns for your attention!
Teunis :'(

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: MaskEdit is jumpy
« Reply #3 on: September 20, 2018, 10:58:19 pm »
On Windows it behaves OK (tested only Lazarus trunk).
B.t.w: you might want to chang the EditMask '99-99-99;1;_' into '99/99/99;1;_'
The slash '/' will be automatically replaced with the systems date-separator.

It will not have any influence on the proble you desribed though.

Bart

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #4 on: September 21, 2018, 05:04:38 pm »
I did a new install from SourceForge. on a different computer Opensuse Leap 15
Pascal 1.8.4 FPC 3.0.4
Still the same problem. If I enter a numbers quickly the cursor moves 2 positions instead of 1
How can I debug the problem?
Strange am I the only one that has this problem?
Teunis

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: MaskEdit is jumpy
« Reply #5 on: September 21, 2018, 06:15:38 pm »
I tested Lazarus trunk on Linux Mint 18.2, both GTK2 and QT: no issues.
I can type as quick as I want, no "jumpyness".

Maybe attach an OnKeyDown event and see if the Key there is what you expect?
The "cursor" by design only advances when you type a character or use the arrow keys.
The moving of the cursor happens in SelectNextChar and SelectPrevChar.
Put some debugln statements there (and/or in InsertChar) to monitor what you want.
Using the debugger to step won't do any good, since this will force you to type "slow".

Bart

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #6 on: September 21, 2018, 08:38:57 pm »
I added a simple OnKeyDown event:
Code: Pascal  [Select][+][-]
  1. procedure TForm8.MaskEdit1KeyDown(Sender: TObject; var Key: Word;
  2.   Shift: TShiftState);
  3. begin
  4.   Label6.Caption:= Label6.Caption + Char(Key);
  5. end;
Now typing the date is much better.
I will keep the KeyDown event.  Shall I keep it in my code and add Label6.Visible:= FALSE ????
Teunis
Tomorrow I will continue this issue

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #7 on: September 22, 2018, 04:14:37 pm »
The KeyDown event is not a solution.
Where can I find the MaskEdit unit? Maybe I can do some debugging.
Where can I download older versions of Lazarus and fpcsrc?
Maybe I can give it a try with this older version of the MaskEdit unit
Yours Teunis

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: MaskEdit is jumpy
« Reply #8 on: September 22, 2018, 04:25:59 pm »
Where can I find the MaskEdit unit? Maybe I can do some debugging.
Windows: C:\lazarus\lcl\maskedit.pp

Quote
Where can I download older versions of Lazarus and fpcsrc?
Maybe I can give it a try with this older version of the MaskEdit unit
https://freepascal.org/download.var
https://freepascal.org/down/old/down.var
https://sourceforge.net/projects/lazarus/files/

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: MaskEdit is jumpy
« Reply #9 on: September 22, 2018, 04:56:28 pm »
In the IDE Ctrl+Click on MaskEdit (in your uses clause), that will open the maskedit unit for you.

Bart

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #10 on: September 23, 2018, 03:34:53 pm »
I still have to look at the older versions.
To show how serious the problem is I attach a screenshot.
Upper left you see the the numbers, that I entered in the MaskEdit1.Text.
And you see the maskedit. In the preview I can't see the attached jpg (5.5 KB)
I will continue because I need MaskEdit for my accounting program
Teunis

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: MaskEdit is jumpy
« Reply #11 on: September 23, 2018, 04:35:09 pm »
Can you try with trunk?

Bart

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #12 on: September 24, 2018, 04:00:53 am »
Yes Bart,
I will (can) do. For me it is a problem that needs to be resolved.
I will continue in this threat. (topic)
Teunis on monday I will give it a try

Middlecope

  • Jr. Member
  • **
  • Posts: 92
Re: MaskEdit is jumpy
« Reply #13 on: September 27, 2018, 09:01:24 pm »
It took some time.  I build lazarus  2.1.0  SVN 59171.
That did not help still the same problem.
Strange,  that I am the only one having that problem.  (Slow typing is OK Quick typing jumpy)
For example quick typing 123456 -> 1_-3_-5_  slow typing 123456 -> 12-34-56
If there is no solution then I will (have to)  make my own object TDatumEdit that will work for my programs.
Thanks for your attention, Teunis

Bart

  • Hero Member
  • *****
  • Posts: 5274
    • Bart en Mariska's Webstek
Re: MaskEdit is jumpy
« Reply #14 on: September 28, 2018, 02:10:42 pm »
TDateEdit does not work for you?

Bart

 

TinyPortal © 2005-2018