View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0034298 | Lazarus | LCL | public | 2018-09-19 08:37 | 2019-05-02 18:52 |
Reporter | melwinek | Assigned To | Jesus Reyes | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | reopened | ||
Platform | x86 | OS | Windows | ||
Target Version | 2.0 | Fixed in Version | 2.1 (SVN) | ||
Summary | 0034298: Autocomplete in DBLookupComboBox | ||||
Description | Autocomplete in DBLookupComboBox not working | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 59666, 59668 | ||||
LazTarget | 2.0 | ||||
Widgetset | |||||
Attached Files |
|
related to | 0035458 | resolved | Juha Manninen | Some data controls regressions since 1.8.x |
|
It also does not work in trunk. This error only occurs when: DBLookupComboBox1.Style:=csDropDownList; If: DBLookupComboBox1.Style:=csDropDown; It's good. However, for me, this first option is more important. |
|
No one else has a problem with this error? |
|
When DBLookupComboBox1.Style=csDropDownList , there's no edit field . You can't use autocomplete in that case . |
|
In earlier versions, this worked as a search. |
|
When DBLookupComboBox1.Style=csDropDownList and DBLookupComboBox1.sorted=true and DBLookupComboBox1 is focused , you still can make a search by typing quickly the word you want . |
|
In 2.0RC1 and trunk when DBLookupComboBox1.Style=csDropDownList and DBLookupComboBox1.sorted=true and DBLookupComboBox1 is focused search by typing word not working. |
|
errno can you check on 2.0RC1? |
|
|
|
Sample code and exe in attachement. |
|
Today, both in RC2 and in trunk, search by typing on keyboard still does not work. |
|
|
|
In this version of Lazarus on Mac OSX 10.14, compiled with ppc386 and LCL cocoa, I encountered a problem in the scrolling-bar. In particular, in the code editing window, and in the form property. When you click on it, the screen is not updated. |
|
I can confirm (on Windows 10) that the provided demo project worked as described in v1.8.4 and even v1.4.4 (searching by typing in csDropDownList mode) - this does not work in trunk any more. This is a regression and should be fixed. I assign this issue to Jesus Reyes who did modifications in the DBCombo/LookupComboBox infrastructure which probably are related. |
|
In earlier versions there was another error: When the combobox was closed, the mouse scroll did not scroll the dataset. When it was open it was ok |
|
|
|
MAC OSX 10.14.1 - Darkmode -COCOA property not use color black object ispector not select correct item |
|
>errno can you check on 2.0RC1? I tested your sample project , and i confirm it doesn't work . However the sample project $(LazarusDir)\examples\database\dblookup\project1.lpi , provided with lazarus , which uses TDBLookupComboBox components works ok . (windows7 64bits widgetset win32/64 lazarus 32 bits trunk) |
|
I checked this example. If Datafield and Datasource are empty then it does not work. For me it is and must be so, I use only Listfield and Listsource. The second thing, I do not know why it searches only the first letter of the typed text. |
|
|
|
O.S: MAC 10.14 Lazarus 2.0 rc last version LCL cocoa Not correct select object in ide form , show image The Textbox not show point mouse for change size or select to move object. Not select label and mouse point not select multi-object |
|
Summary: In TRUNK and in RC2 in dblookupcombobox search does not work by typing on the keyboard when dataset is null and DBLookupComboBox1.Style = csDropDownList. I have temporarily fixed this problem for myself, replacing in a file lcl\include\dblookupcombobox.inc: procedure TDBLookupComboBox.UTF8KeyPress(var UTF8Key: TUTF8Char); begin if not FDataLink.CanModify then UTF8Key := ''; inherited UTF8KeyPress(UTF8Key); end; to: procedure TDBLookupComboBox.UTF8KeyPress(var UTF8Key: TUTF8Char); begin // if not FDataLink.CanModify then // UTF8Key := ''; inherited UTF8KeyPress(UTF8Key); end; Can someone finally check and fix it? |
|
I understood this is a regression and set target to 2.0. Jesus, can you please look at the issue. melwinek, you could also make a proper patch: http://wiki.lazarus.freepascal.org/Creating_A_Patch |
|
Juha Manninen: I have too little knowledge to repair myself. This change, which I made, corrected only this error, but I do not know if what I removed is not required for other functions. |
|
Fixed with changes to the proposed patch, I don't think the dbcombobox reform is related to this problem, it seems to be a previous patch, probably 55911 (not really checked), which didn't account for unbound usage. Please test. |
|
dblookupcombobox.inc(46,6) Error: Identifier not found "IsUnbound" dblookupcombobox.inc(58,28) Error: method identifier expected dblookupcombobox.inc(60,14) Error: Identifier not found "FDataLink" dblookupcombobox.inc(60,44) Error: Identifier not found "DataField" dbctrls.pp(1919) Fatal: There were 4 errors compiling module, stopping Fatal: Compilation aborted |
|
Sorry, I missed a change, please test again |
|
Now is good. Thank you. Will this fix be included in version 2.0 RC3 and in the future in 2.0? |
|
is now queued |
|
dblookupcombobox onChange event not working (on lazarus 2.0) |
|
@usri irfani: Use OnSelect event, not OnChange @Jesus Reyes: With unbound usage (just ListSource, KeyField and ListField assigned; DataSource and DataField not assigned) the autocomplete is not working. Only the first character typed in works as intended, any other characters typed in erases the contents of the DBLookupComboBox. (2.0.0 and 2.0.2 affected, earlier versions are working.) |
|
Please see attached sample project. Tested on Windows 10 64bit (1809 build 17763.437), Problem is present with compiler FPC 3.0.4 + Lazarus 2.0.0 (r60307), Lazarus 2.0.2 (r60954), Lazarus 2.1.0 (SVN trunk r61045). Problem was not present: FPC 3.0.0 + Lazarus 1.6 (r51630) FPC 3.0.4 + Lazarus 1.8.4 (r57972) |
|
@mavika Thanks for the test and the information about the versions. I can reproduce the problem, I have a question about how autocomplete works I made a simple test with a standard combobox where I filled the numbers and reproduced the provided instructions with the "one" word.. while it is not a dblookupcomobobox I think that we should get the basic autocomplete functionality right or else it will be reflected in the derived components This is what I observe after typing each character (the events are triggered in that order): "o": OnChange: ItemIndex=-1 Text=o | OnSelect: ItemIndex=1 Text=one "n": OnChange: ItemIndex=-1 Text=on | OnSelect: ItemIndex=1 Text=one "e": OnChange: ItemIndex=-1 Text=one | OnSelect: --NOT TRIGGERED-- This doesn't look right to me. The typing of the "o" character matches the "one" item, itemindex=1 and is correctly set, as "one" is the second item. but then when "n" is typed, the itemindex is again -1 yet "n" or the typed word "on" still matches the one word, Why the OnChange is triggered if the text that the user see is still "one" (in other words, why OnChange is triggered if the text is not) also why does itemindex change?, and worse, why is OnSelect triggered again reporting itemindex=1 if the item is already selected. And finally when "n" is typed and "one" is fully matched and OnSelect is not triggered which is right because the item is already selected. My guess is that once a partial match is found it should be kept until a match is refined or rejected. I think this should be fixed first. Yet I don't know if this is the intended behavior, I would like to submit a bug report about it if necessary. In the mean time, I think a possible fix for this problem is commenting this line: function TDBLookupComboBox.DoEdit: boolean; begin if IsUnbound then begin if DetectedEvents and DBCBEVENT_SELECT <>0 then begin //UpdateData(self); // <-- HERE DoOnSelect; end; if DetectedEvents and DBCBEVENT_CLOSEUP <>0 then DoOnCloseUp; end else Result := inherited DoEdit; end; I remember that I wrote that code trying to keep the expected behavior, which was broken by the dbcombobox reform. but after thinking about it, I now believe that an unbound dblookupcombobox should not try update a field that is not really linked. More tests need to be made but I want to defer that until the autocomplete behavior is clarified. |
|
Thank you for the response and testing! I didn't expected, that the standard combobox is also affected. If the basic problem is here, then no wonder, it's reflected in the derived components. Meanwhile, i modified all of my projects that use this component: i changed the style of the DBLookupComboBox from csDropDown to csDropDownList, doing so, the autocomplete function works again (it searches in the drop-downed-list, not in-the-box). For me it's not a problem anymore, i like even better the csDropDownList style. I made also further tests with this (please see attached project). I can confirm, that commenting out the "UpdateData(self);" line in dblookupcombobox.inc file fixes the autocomplete function (style=csDropDown), but the onChange and onSelect events are not triggered. Offtopic: thank you and all of the other developers for all the effort in making this great software even better! |
|
I reopen this as it seems there are issues left. |
|
Please keep in mind that lookup controls require two data sources for proper operation. One for data (DataSource property) and another for lookup data (LookupSource property). Please check the attached test project (test2.zip). |
|
I'm sorry, it looks like I made a mistake. I checked and Delphi allows this action. I'll take care of it. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-09-19 08:37 | melwinek | New Issue | |
2018-09-20 21:26 | melwinek | Note Added: 0110904 | |
2018-09-21 11:41 | melwinek | Note Edited: 0110904 | View Revisions |
2018-10-27 13:38 | melwinek | Note Added: 0111613 | |
2018-10-27 15:05 | errno | Note Added: 0111615 | |
2018-10-27 15:13 | errno | Note Edited: 0111615 | View Revisions |
2018-10-27 16:59 | melwinek | Note Added: 0111621 | |
2018-10-27 22:09 | errno | Note Added: 0111625 | |
2018-10-27 23:15 | melwinek | Note Added: 0111626 | |
2018-11-02 09:07 | melwinek | Note Added: 0111741 | |
2018-11-05 14:11 | melwinek | File Added: TEST.ZIP | |
2018-11-05 14:12 | melwinek | Note Added: 0111799 | |
2018-11-13 15:49 | melwinek | Note Added: 0111953 | |
2018-11-14 09:38 | laguna | File Added: Schermata 2018-11-13 alle 07.49.23.jpg | |
2018-11-14 09:38 | laguna | Note Added: 0111964 | |
2018-11-14 11:39 | wp | Note Added: 0111968 | |
2018-11-14 11:39 | wp | Assigned To | => Jesus Reyes |
2018-11-14 11:39 | wp | Status | new => assigned |
2018-11-14 13:08 | melwinek | Note Added: 0111970 | |
2018-11-17 06:48 | laguna | File Added: Schermata 2018-11-17 alle 06.42.20.png | |
2018-11-17 06:49 | laguna | Note Added: 0112012 | |
2018-11-17 07:16 | laguna | Note Edited: 0112012 | View Revisions |
2018-11-18 10:59 | errno | Note Added: 0112033 | |
2018-11-18 11:00 | errno | Note Edited: 0112033 | View Revisions |
2018-11-18 11:02 | errno | Note Edited: 0112033 | View Revisions |
2018-11-18 11:02 | errno | Note Edited: 0112033 | View Revisions |
2018-11-18 11:14 | errno | Note Edited: 0112033 | View Revisions |
2018-11-19 07:52 | melwinek | Note Added: 0112060 | |
2018-11-19 07:59 | melwinek | Note Edited: 0112060 | View Revisions |
2018-11-19 08:19 | laguna | File Added: Schermata 2018-11-19 alle 08.04.51.png | |
2018-11-19 08:20 | laguna | Note Added: 0112061 | |
2018-11-19 15:16 | errno | Note Edited: 0112033 | View Revisions |
2018-11-22 14:45 | melwinek | Note Added: 0112111 | |
2018-11-26 10:48 | Juha Manninen | LazTarget | => 2.0 |
2018-11-26 10:48 | Juha Manninen | Note Added: 0112198 | |
2018-11-26 10:48 | Juha Manninen | Target Version | => 2.0 |
2018-11-26 10:55 | melwinek | Note Added: 0112200 | |
2018-11-26 19:45 | Jesus Reyes | Fixed in Revision | => 59666 |
2018-11-26 19:45 | Jesus Reyes | Note Added: 0112212 | |
2018-11-26 19:45 | Jesus Reyes | Status | assigned => resolved |
2018-11-26 19:45 | Jesus Reyes | Fixed in Version | => 2.1 (SVN) |
2018-11-26 19:45 | Jesus Reyes | Resolution | open => fixed |
2018-11-26 20:45 | melwinek | Note Added: 0112214 | |
2018-11-26 20:54 | Jesus Reyes | Note Added: 0112215 | |
2018-11-26 21:06 | melwinek | Note Added: 0112216 | |
2018-11-26 21:12 | melwinek | Note Edited: 0112216 | View Revisions |
2018-11-26 21:14 | melwinek | Note Edited: 0112216 | View Revisions |
2018-11-26 21:15 | melwinek | Note Edited: 0112216 | View Revisions |
2018-11-27 11:24 | melwinek | Note Edited: 0112216 | View Revisions |
2018-11-27 20:34 | Jesus Reyes | Note Added: 0112236 | |
2019-03-06 21:21 | Jesus Reyes | Fixed in Revision | 59666 => 59666, 59668 |
2019-04-05 09:32 | yusri irfani | Note Added: 0115237 | |
2019-04-23 10:00 | mavika | Note Added: 0115744 | |
2019-04-24 09:45 | mavika | File Added: test.zip | |
2019-04-24 09:45 | mavika | Note Added: 0115768 | |
2019-04-26 20:59 | Jesus Reyes | Note Added: 0115834 | |
2019-04-26 21:01 | Jesus Reyes | Note Edited: 0115834 | View Revisions |
2019-04-26 21:09 | Jesus Reyes | Note Edited: 0115834 | View Revisions |
2019-04-29 09:30 | mavika | File Added: combobox_events_triggered.png | |
2019-04-29 09:30 | mavika | File Added: test2.zip | |
2019-04-29 09:30 | mavika | Note Added: 0115886 | |
2019-05-02 15:09 | Juha Manninen | Relationship added | related to 0035458 |
2019-05-02 15:20 | Juha Manninen | Status | resolved => assigned |
2019-05-02 15:20 | Juha Manninen | Resolution | fixed => reopened |
2019-05-02 15:20 | Juha Manninen | Note Added: 0115956 | |
2019-05-02 16:19 | Michal Gawrycki | File Added: test2-2.zip | |
2019-05-02 16:19 | Michal Gawrycki | Note Added: 0115959 | |
2019-05-02 18:52 | Michal Gawrycki | Note Added: 0115964 |