Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 29 Mar 2024, 09:47

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 19 Sep 2019, 07:32 
Offline

Joined: 11 Jul 2019, 12:56
Posts: 18
I am having several issues when using STFilter in Lazarus.
I am using local sorting only (TMemTableEh).

1. When setting STFilter location property to stflUnderTitleFilterEh in TDbGridEh, it's dialog doesn't work when clicking drop down arrows under Linux ( Under Windows it opens).
2. When typing text in the filter and then pressing enter I get an exception message (Index based on unknown field 'Like') (This occurs under both Windows and Linux, and only when using stflUnderTitleFilterEh)
3. When using "stflInTitleFilterEh" dialog opens (behaves laggy on Linux, fast on windows). However when there is larger amount of records to be filtered after pressing "Ok" button there is a significant wait time compared to SearchPanel which filters results very fast! And program becomes unresponsive for some time, even after data has been filtered.

I have attached an demo project that simulates this behaviour.

I am using Lazarus 2.0.4 with fpc 3.0.4 on Linux Mint 19.2 xfce 64bit and Windows 7 sp1 x64.

Best Regards,
Mladen


Attachments:
ehLibTest.7z [226.92 KiB]
Downloaded 171 times
ehlib1.jpg
ehlib1.jpg [ 142.47 KiB | Viewed 1724 times ]
Top
 Profile  
 
PostPosted: 20 Sep 2019, 02:43 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Quote:
1. When setting STFilter location property to stflUnderTitleFilterEh in TDbGridEh, it's dialog doesn't work when clicking drop down arrows under Linux ( Under Windows it opens).
2. When typing text in the filter and then pressing enter I get an exception message (Index based on unknown field 'Like') (This occurs under both Windows and Linux, and only when using stflUnderTitleFilterEh)


Unfortunately in GTK (Linux) there is no support for displaying EditButtons in EditControls.
A lot of work needs to be done to rewrite all Edit controls in EhLib so that they can support EditButtons in both Win32 and GTK (Linux).
Partially, we added support for EditButtons in the grid cell editor, but in FilterEdit (stflUnderTitleFilterEh) and TDBEditEh such support has not been added yet. Perhaps we will add it in the next version of the library.
For this reason, items 1 and 2 will not work in EhLib 9.4

Quote:
3. When using "stflInTitleFilterEh" dialog opens (behaves laggy on Linux, fast on windows). However when there is larger amount of records to be filtered after pressing "Ok" button there is a significant wait time compared to SearchPanel which filters results very fast! And program becomes unresponsive for some time, even after data has been filtered.

SearchPanel filter uses only EhLib code to filter records.
When filter using stflInTitleFilterEh (and stflUnderTitleFilterEh) the internal Lazarus classes are used to filter records with combination of EhLib code.
We still do not fully understand how the code in Lazarus works related to filtering.
Therefore, we can’t say when we will fix this part of the functional.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 23 Sep 2019, 13:36 
Offline

Joined: 11 Jul 2019, 12:56
Posts: 18
Thank you for your reply! :)

I will use stflInTitleFilterEh property from now on.
I also forgot to mention that when using stflInTitleFilterEh property and using custom filter "begins with" with some value I always get an exception message "Index based on unknown field 'Like'".
Maybe I am not using it the right way?

Best Regards,
Mladen


Attachments:
Screenshot_2019-09-23_15-34-50.png
Screenshot_2019-09-23_15-34-50.png [ 112.82 KiB | Viewed 1699 times ]
Top
 Profile  
 
PostPosted: 23 Sep 2019, 23:48 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Unfortunately, Lazarus TBufDatasetParse does not support the Like operator in the DataSet.Filter property.
So we should remove the lines
'begins with', 'does not begin with', 'ends with', 'does not end with', 'contains', 'does not contain', 'like', 'not like'
from the operator ComboBox.

The good news - TBufDatasetParse allows to use '*' with the operator '=' (equals).

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 30 Sep 2019, 06:07 
Offline

Joined: 11 Jul 2019, 12:56
Posts: 18
Thank you, its good to know that those that Lazarus doesn't support will be removed, so our clients don't get confused :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group