RC3 loss good future of RC2 lazarus / 9-Editor ---------------------------------------------------------------------- staratel20 · 2016-02-09 20:23 When I press Ctrl+F12 for to view units in RC2, and type some text in filter - then I just press VK_DOWN to go to filter results. In RC3 I need to press Tab, then Down and Up to move to first filter result. What for to do this? It's bad! ---------------------------------------------------------------------- Cyrax · 2016-02-09 20:32 RC3 of what? Lazarus 1.6 series? ---------------------------------------------------------------------- balazsszekely · 2016-02-09 20:50 Quote@staratel20 When I press Ctrl+F12 for to view units in RC2, and type some text in filter - then I just press VK_DOWN to go to filter results. In RC3 I need to press Tab, then Down and Up to move to first filter result. What for to do this? It's bad!By this post, you auto-assigned yourself to fix this issue  : 1. Go to $(LazarusDir)\IDE\ 2. Open ViewUnit_Dlg.pp 3. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TViewUnitDialog.FilterEditKeyDown(Sender: TObject; var Key: Word;  Shift: TShiftState);begin  if Key = VK_DOWN then    ListBox.SetFocus;end;4. Rebuild Lazarus(Menu-->Tools-->Build Lazarus with Profile Normal IDE), test if the code works fine 5. Create a patch(http://wiki.freepascal.org/Creating_A_Patch) 6. Add a new issue to the bugtracker(select lazarus patch, 1.6): http://bugs.freepascal.org/main_page.php ---------------------------------------------------------------------- Blaazen · 2016-02-09 21:08 Only Lazarus 1.4 had RC3, I recommend to upgrade before reporting any issues. ---------------------------------------------------------------------- staratel20 · 2016-02-09 21:35 GetMem: Thank you! This simple training be very good for me as my first step in this work) Blaazen:Ok, my bad. ---------------------------------------------------------------------- JuhaManninen · 2016-02-09 21:54 Quote from: GetMem on February 09, 2016, 09:50:06 pm3. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TViewUnitDialog.FilterEditKeyDown(Sender: TObject; var Key: Word;  Shift: TShiftState);begin  if Key = VK_DOWN then    ListBox.SetFocus;end; No, don't create such a patch. The FilterEdit already takes care of key events and synchronizes with the associated ListBox. The behavior was improved recently due to a bug report. GetMem, do you think it does not work well now? ---------------------------------------------------------------------- staratel20 · 2016-02-10 05:03 JuhaManninen: I think GetMem joke this way). Of cause I understand all was done before me. ---------------------------------------------------------------------- staratel20 · 2016-02-10 05:12 Blaazen: I take source from here(1.6 RC3): http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6/ where from did you get 1.7? or 1.7 exists only for linux? ---------------------------------------------------------------------- Cyrax · 2016-02-10 05:16 Quote from: staratel20 on February 10, 2016, 06:12:54 amBlaazen: I take source from here(1.6 RC3): http://svn.freepascal.org/svn/lazarus/branches/fixes_1_6/ where from did you get 1.7? or 1.7 exists only for linux? 1.7 is the trunk aka development version of Lazarus. ---------------------------------------------------------------------- FTurtle · 2016-02-10 05:35 Quote from: staratel20 on February 10, 2016, 06:12:54 amwhere from did you get 1.7? or 1.7 exists only for linux? http://wiki.freepascal.org/Version_Numbering ---------------------------------------------------------------------- balazsszekely · 2016-02-10 05:57 @Juha QuoteNo, don't create such a patch. The FilterEdit already takes care of key events and synchronizes with the associated ListBox.I was only trying to encourage the OP to try solve the issues(s) by himself. That particular solution I gave is useless, I never intended to be a fix. QuoteThe behavior was improved recently due to a bug report. GetMem, do you think it does not work well now Yes, in my opinion is not working correctly. Here is how you can reproduce the issue(trunk), which is not related to VK_DOWN: 1. Create a new project 2. Add two more forms to the project 3. Press Ctrl+F12 4. Type "unit1", unit1 is not selected + after this nothing works as it should(I cannot select any unit, although I type the name correctly, I cannot jump to the listbox, etc...) PS: On the other hand, the filter on the componentlist(Ctrl+Alt+P) is working fine. If I type "Tree" all  tree related  components are displayed, the first one is selected. ---------------------------------------------------------------------- staratel20 · 2016-02-10 17:40 FTurtle: very interesting info. thank you. GetMem: >>That particular solution I gave is useless, I never intended to be a fix. Just of curiosity I try to do this "just for myself". What interest - if I set breakpoint in OnKeyDown - I see that event never appear whatever key I press. What can be the reason? ---------------------------------------------------------------------- staratel20 · 2016-02-10 18:44 GetMem: Are you sure? Did you mean "in the most of cases setting breakpoint do not work"? Because if I set breakpoint on FromCreate in unit ViewUnit_Dlg - program stops on breakpoint normally. ---------------------------------------------------------------------- balazsszekely · 2016-02-10 19:09 @staratel20 Sorry I mixed up(removed that silly post)...You cannot build it as a normal application, you can debug it though: Please read this thread: http://forum.lazarus.freepascal.org/index.php/topic,27564.0.html ---------------------------------------------------------------------- staratel20 · 2016-02-10 19:18 GetMem: very interesting. Thank's. ---------------------------------------------------------------------- JuhaManninen · 2016-02-10 20:03 Quote from: GetMem on February 10, 2016, 06:57:10 amYes, in my opinion is not working correctly. Here is how you can reproduce the issue(trunk), which is not related to VK_DOWN: 1. Create a new project 2. Add two more forms to the project 3. Press Ctrl+F12 4. Type "unit1", unit1 is not selected + after this nothing works as it should(I cannot select any unit, although I type the name correctly, I cannot jump to the listbox, etc...) PS: On the other hand, the filter on the componentlist(Ctrl+Alt+P) is working fine. If I type "Tree" all  tree related  components are displayed, the first one is selected. Yes, they behave slightly differently because the controls are different. The unit list is a ListBox, the component list is a TreeView. The first item in unit list is not selected automatically, true, but one Down key press is enough to select it. Your explanation gave an impression that you cannot select list items at all. For me it works very well both with arrow keys and with mouse. The only minor inconsistency is that the first item is not selected automatically. [Edit] Now I tested the Windows version and the arrow does not work. Can somebody please study the issue. I am tired with the widgetset differences. ---------------------------------------------------------------------- balazsszekely · 2016-02-10 20:12 Quote[Edit] Now I tested the Windows version and the arrow does not work. Can somebody please study the issue. I am tired with the widgetset differences.Yes, I will  create a patch soon. ---------------------------------------------------------------------- JuhaManninen · 2016-02-10 20:37 It certainly worked some time ago also on Windows. Must bisect later what broke it. ---------------------------------------------------------------------- balazsszekely · 2016-02-10 20:46 I found the bug, it was introduced with in r51267(listfilteredit.pas, procedure MoveTo), the fix is simple, we have to add two more lines: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i fFilteredListbox.Selected[AIndex] := True; //this one twiceShould I create a patch or would you like to add it manually? ---------------------------------------------------------------------- JuhaManninen · 2016-02-10 20:55 Quote from: GetMem on February 10, 2016, 09:46:18 pmShould I create a patch or would you like to add it manually? Add where? Can you create a patch and attach it here? BTW, r51267 also fixed a division by zero caused by fFilteredListbox.ItemHeight being always zero. That is another mystery. ItemHeight used to have proper value. When I made a simple test program with ListView, there ItemHeight had a correct value. If you have time and energy, you can solve this mystery, too. ---------------------------------------------------------------------- balazsszekely · 2016-02-10 21:03 @Juha You can find the patch in the zip file. ---------------------------------------------------------------------- JuhaManninen · 2016-02-10 21:16 Quote from: GetMem on February 10, 2016, 10:03:37 pmYou can find the patch in the zip file. Thanks. Applied in r51583. Will be merged to 1.6 which will be released soon, so the timing was good. ---------------------------------------------------------------------- balazsszekely · 2016-02-10 21:24 Apparently if you set ListBox style to lbOwnerDrawFixed(which is true in our case), ItemHeight will automatically change to 0(which is very strange, or not?). The good news is it can be set later to any specific value. I'm not sure 22 is the right value in our case. ---------------------------------------------------------------------- JuhaManninen · 2016-02-10 21:30 Quote from: GetMem on February 10, 2016, 10:24:01 pmApparently if you set ListBox style to lbOwnerDrawFixed(which is true in our case), ItemHeight will automatically change to 0(which is very strange, or not?). The good news is it can be set later to any specific value. Yes it is strange. Even more strange, the code has worked earlier without the fall-back value hack. I started to get div by zero errors only some time ago. I may bisect the guilty revision later. QuoteI'm not sure 22 is the right value in our case. The right value depends on widgetset. Value 22 is "good enough". ---------------------------------------------------------------------- balazsszekely · 2016-02-10 21:54 The ItemHeight calculation(PageUp, PageDown) it was introduced in r.51064, but at this point, the listbox on ViewUnit_Dlg is already lbOwnerDrawFixed. The only logical explanation is that on some widgetset the ItemHeight is a non-zero value, even if the style is lbOwnerDrawFixed. But you're right @Juha, value 22 is "good enough" and works on every widgetset. ---------------------------------------------------------------------- staratel20 · 2016-02-11 11:05 GetMem: your patch works fine, thanks. ---------------------------------------------------------------------- balazsszekely · 2016-02-11 11:30 @staratel20 You're welcome! Juha already applied it in r51583. You should download Tortoise SVN, then do a checkout to a separate directory(http://svn.freepascal.org/svn/lazarus/trunk), you will have the latest SVN version(if you're interested in development). For more details please read this: http://wiki.lazarus.freepascal.org/Getting_Lazarus ---------------------------------------------------------------------- staratel20 · 2016-02-11 13:02 GetMem: of cause interested, that's why I'm here)). Already use SVN. There many new information, need time to organize it in my mind. Lazarus looks very powerful(and quick grow up - it's makes my happy) . Today, when works with my same project in Delphi 7 I'm filling like in Win3.1 after Win95 . ---------------------------------------------------------------------- balazsszekely · 2016-02-11 13:10 QuoteThere many new information, need time to organize it in my mind. True! Take your time, no need to hurry! QuoteLazarus looks very powerful(and quick grow up - it's makes my happy) .It grew a lot, especially in the past 2-3 years. ---------------------------------------------------------------------- staratel20 · 2016-02-11 13:44 Yes, I try Lazarus years ago, but at that time it was not so impressive as now. If new debugger will hint properties values(also maybe display records as a tree in hint) - it'll be one another big step forward. Btw: not clean for me reason to do the window, appears when click on circle-button with two little arrows down on component pallete. Maybe easier to realize and better was to do for to appear the window Components(Alt+Ctrl+P) - with more possibilities?