Page 1 of 2

Zeoslib x TDBcombobox Component

Posted: 21.06.2012, 15:26
by calico
Hi,
I installed the new version of zeosdbo (7.0.0-dev - 1401 + postgresql) in delphi xe2, when I use TDbLookupComboBox, the items are not located in the component when I write. Tests with TDbLookupComboBox + ado + sqlserver works well. what's the problem?

Tks.
Carlos

Posted: 21.06.2012, 21:46
by EgonHugeist
calico,

i've trued to rebuild your reported issue and i did fail with my branch:http://zeos.firmos.at/viewtopic.php?t=3427

So can you tell me which branch do ou use here? If the issue is still present then i need an example...

Michael

Posted: 22.06.2012, 15:13
by calico
hello Michael

I use the version:
https://zeoslib.svn.sourceforge.net/svn ... onhugeist/

Revision 1403 is worse, not associated with the key value in the combo and the first execution error occurs "... expecting: WideString actual: String '.
I added two videos in the original post.
Tks.

Posted: 22.06.2012, 15:36
by EgonHugeist
calico,

i see now what you mean. Question the second TBLookupComboBox is not linked with Zeos, right?

My first impresson is that we are able to locate the values as long the char sequence is fullfilled. Which means (in my mind) we can locate a string like 'aaddee' as long the keypress is a, a, d .....

I think we have a leak here. We have to check if there are no results (Locate=False) If nothing is to find then we have to refresh the comparing values.. All the stuff is to find in the TZAbstractRODataSet.pas unit..

I'm bussy actually. Either you are patiant with that fix or you try to help me here. You've got a stroong debugger and compiler to help.

Michael

Posted: 22.06.2012, 15:48
by calico
Michael,

you're right, the second combobox is not linked to zeos.
Well, I do not know if I can change the code efficiently and without causing other problems.

Thanks for now.

Posted: 22.06.2012, 16:57
by EgonHugeist
calico,

What happens if you presse delete after the last keypress failed? For both components?

Is it possible the you do not have to restart intyping the values with Zeos but with the ADO component? If that is true than it word be nice to have a property for that to deside how the component should behave or not?

Michael

Posted: 22.06.2012, 18:48
by calico
Michael,

if I press delete nothing happens in both components, if I press Backspace or wait a few seconds the search buffer is cleared in ADO, in zeos nothing happens, as shown in the video. Wed Remembering the latest version also does not assign value to combo with the mouse, as if the property value "DataField" the Combo was null, but the value is ok.

The version of the month 03/2012, did not specify to install for delphi XE2, used the installation directory "Delphi16" worked correctly.

Tks.

Posted: 22.06.2012, 19:27
by EgonHugeist
calico,

[s]If i have the time i'll check the reported issue. New compiler new behavior. I'll check what the older delphi/Lazarus components are doing in this case.
[/s]
Strange! it only happens in unicode mode..

The version of the month 03/2012, did not specify to install for delphi XE2, used the installation directory "Delphi16" worked correctly.
Use the svn please. 03/2012 is long ago and many fixes where done. Where did you get this version? User Miab3 and Ism helpe me for the XE2 support...

Michael

Posted: 22.06.2012, 20:17
by calico
Michael,

I use SVN. I always keep the current version before upgrading to a new with SVN. Testing the old versions on my bkps saw corretamete to be worked in this case. Thank you for your attention. If I find something I'll post.

Posted: 22.06.2012, 20:22
by EgonHugeist
calico,

me again. IF you do all your keypres a little bit slower it works i think? Also the buffer clearing is working. But everything is a little bit slower.. So i think the value comparing ist to slow. Can you confirm this?

Posted: 22.06.2012, 20:38
by miab3
EgonHugeist

But even for unicode version lookup for numeric keys work properly.

I share my current folder for DXE2 packages.
The default is built version of the "Debug, 32-bit".
By changing the options to build the remaining "Release-32-bit", "Debug-64-bit" and "Release-64-bit".

Michal Abramczyk

Posted: 22.06.2012, 20:39
by calico
Michael,

In the current version (Revision 1405) nothing works, because the items in the combo can not be selected with the mouse or keyboard. as shown in the video-Problem Revision1403.avi, first combo. It seems that the combo was disabled in this version.

Posted: 22.06.2012, 20:56
by calico
More,

I tested the package posted by EgonHugeist, and behavior is the same as the video, Revision1403.avi. combo behaving as if no value in the property value data field.

Posted: 22.06.2012, 21:02
by miab3
With me in Delphi XE2 and Zeos7eh1405 with MySQL5 lookup looks like:

Posted: 22.06.2012, 21:11
by EgonHugeist
calico, miab3,

it's late now. I've to work tomorrow. Maybe you have some findings if i tell you the lines where the fieldcomparing happens (first impresseion but could be another issue and hard to debug because of the timer the db-unit brings with)

the vaule comparing happend in the ZDataSetUtils.pas
function CompareFieldsFromResultSet(const FieldRefs: TObjectDynArray;
const KeyValues: TZVariantDynArray; ResultSet: IZResultSet; PartialKey: Boolean;
CaseInsensitive: Boolean): Boolean;

procedure PrepareValuesForComparison(const FieldRefs: TObjectDynArray;
var DecodedKeyValues: TZVariantDynArray; ResultSet: IZResultSet;
PartialKey: Boolean; CaseInsensitive: Boolean);

each keypress calls the InternalLocate of the unit ZAbstractRODataset.pas..

@calico, with my XE it works, very slow but it works..

@Michal, i'll commit you files tomorrow.

Michael