[Lazarus] Alternative component palette layout

Giuliano Colla giuliano.colla at fastwebnet.it
Fri Dec 26 13:23:39 CET 2014


Il 22/12/2014 10:05, zeljko ha scritto:
> On 12/22/2014 12:29 AM, Juha Manninen wrote:
>> On Sun, Dec 21, 2014 at 5:27 PM, zeljko <zeljko at holobit.net> wrote:
>>> What could be exact bug with Qt ? Any example project ?
>>> What is exactly affected ?
>>
>> My main suspect now is line :
>>    TabControl.Pages.Move(TabIndex, Pal.fVisiblePageIndex);
>> in TComponentPage.InsertVisiblePage. It moves an exising tab to its
>> new position.
>> I noticed that the missing tabs are always the ones that existed
>> before doing import. Thus they are not inserted but moved.
>> New tabs are inserted :
>>    TabControl.Pages.Insert(Pal.fVisiblePageIndex, PageName);
>> but it apparently causes no problems.
>

I've added some more Debugln's and made some more tests.
I've painfully rebuilt from scratch the Modern layout, for my current 
palette setup.
Import works just fine, but what fails is restoring the default layout.

The debug lines, after "restore defaults" tell:
> TComponentPalette.UpdateNoteBookButtons: FPageCount before=14
> TComponentPalette.UpdateNoteBookButtons: FPageCount after=14 PageCount=19
> TComponentPalette.InsertVisiblePage: Inserting Page=Standard, at index=0
> TComponentPalette.UpdateNoteBookButtons: PageIndex=0 PageName=Standard
> TComponentPalette.InsertVisiblePage: Inserting Page=Additional, at 
> index=1
> TComponentPalette.UpdateNoteBookButtons: PageIndex=1 PageName=Additional
> TComponentPalette.InsertVisiblePage: Inserting Page=Common Controls, 
> at index=2
> TComponentPalette.UpdateNoteBookButtons: PageIndex=2 PageName=Common 
> Controls
Pages Dialog, Data Control Data Access and System appear to be already 
in their position and are not moved (which is wrong):
>
> TComponentPalette.InsertVisiblePage: Start moving Page=Dialogs from 3 
> to 3
> TComponentPalette.UpdateNoteBookButtons: PageIndex=3 PageName=Dialogs
> TComponentPalette.InsertVisiblePage: Start moving Page=Data Controls 
> from 4 to 4
> TComponentPalette.UpdateNoteBookButtons: PageIndex=4 PageName=Data 
> Controls
> TComponentPalette.InsertVisiblePage: Start moving Page=Data Access 
> from 5 to 5
> TComponentPalette.UpdateNoteBookButtons: PageIndex=5 PageName=Data Access
> TComponentPalette.InsertVisiblePage: Start moving Page=System from 6 to 6
> TComponentPalette.UpdateNoteBookButtons: PageIndex=6 PageName=System
Now page Misc should be added at index 7, but actually it is inserted in 
position 3, while the content is the one of the actual page 3 (i.e. 
Dialogs). The rest is inconsistent accordingly. Pages which should be 
moved aren't moved, and the content is inconsistent.
> TComponentPalette.InsertVisiblePage: Inserting Page=Misc, at index=7
> TComponentPalette.UpdateNoteBookButtons: PageIndex=7 PageName=Misc
> TComponentPalette.InsertVisiblePage: Start moving Page=LazControls 
> from 8 to 8
> TComponentPalette.UpdateNoteBookButtons: PageIndex=8 PageName=LazControls
> TComponentPalette.InsertVisiblePage: Start moving Page=Cairo from 9 to 9
> TComponentPalette.UpdateNoteBookButtons: PageIndex=9 PageName=Cairo
> TComponentPalette.InsertVisiblePage: Start moving Page=Extra from 10 
> to 10
> TComponentPalette.UpdateNoteBookButtons: PageIndex=10 PageName=Extra
> TComponentPalette.InsertVisiblePage: Inserting Page=MultiLog, at index=11
> TComponentPalette.UpdateNoteBookButtons: PageIndex=11 PageName=MultiLog
> TComponentPalette.InsertVisiblePage: Start moving Page=Pascal Script 
> from 12 to 12
> TComponentPalette.UpdateNoteBookButtons: PageIndex=12 PageName=Pascal 
> Script
> TComponentPalette.InsertVisiblePage: Start moving Page=RTTI from 13 to 13
> TComponentPalette.UpdateNoteBookButtons: PageIndex=13 PageName=RTTI
> TComponentPalette.InsertVisiblePage: Start moving Page=SQLdb from 14 
> to 14
> TComponentPalette.UpdateNoteBookButtons: PageIndex=14 PageName=SQLdb
> TComponentPalette.InsertVisiblePage: Start moving Page=SynEdit from 15 
> to 15
> TComponentPalette.UpdateNoteBookButtons: PageIndex=15 PageName=SynEdit
> TComponentPalette.InsertVisiblePage: Start moving Page=Chart from 16 
> to 16
> TComponentPalette.UpdateNoteBookButtons: PageIndex=16 PageName=Chart
> TComponentPalette.InsertVisiblePage: Start moving Page=IPro from 17 to 17
> TComponentPalette.UpdateNoteBookButtons: PageIndex=17 PageName=IPro
> TComponentPalette.InsertVisiblePage: Start moving Page=fpWeb from 18 
> to 18
> TComponentPalette.UpdateNoteBookButtons: PageIndex=18 PageName=fpWeb 

Does this trace tell something to someone who wrote the code?

Giuliano

-- 
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?





More information about the Lazarus mailing list