View Issue Details

IDProjectCategoryView StatusLast Update
0019803LazarusLCLpublic2019-04-22 19:30
ReporterMartin FriebeAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0019803: New TTabcontrol breaks existing code => package IDEInspector
Descriptiontry install IDEInspector, and run lazarus. this will crash at startup

The tab control in question is used to contain a single component (the same component for all tabs). The component changes content depending on tab.
Additional Information[FORMS.PP] ExceptionOccurred
   Sender=EInvalidOperation
   Exception=Control of class 'TTabControl' can't have control of class
'TCustomPropertiesGrid' as a child
   Stack trace:
   $005C2EE0 line 2317 of include/control.inc
   $005C2F50 line 2329 of include/control.inc
   $005C689E line 3527 of include/control.inc
   $00C78E18 line 762 of maininspector.pas
   $00C79254 line 817 of maininspector.pas
   $00825D91 line 4782 of ../packager/packagesystem.pas
   $00818553 line 1335 of ../packager/packagesystem.pas
   $00ABDC22 line 61 of lazaruspackageintf.pas
   $00496682 line 16 of ideinspector.pas
   $00825D91 line 4782 of ../packager/packagesystem.pas
   $00825BE8 line 4748 of ../packager/packagesystem.pas
   $0082B1B5 line 1407 of ../packager/pkgmanager.pas
   $0082C361 line 1643 of ../packager/pkgmanager.pas
   $0044B57A line 1427 of main.pp
   $00403214 line 107 of lazarus.pp
TApplication.HandleException Control of class 'TTabControl' can't have
control of class 'TCustomPropertiesGrid' as a child
   Stack trace:
   $005C2EE0 line 2317 of include/control.inc
   $005C2F50 line 2329 of include/control.inc
   $005C689E line 3527 of include/control.inc
   $00C78E18 line 762 of maininspector.pas
   $00C79254 line 817 of maininspector.pas
   $00825D91 line 4782 of ../packager/packagesystem.pas
   $00818553 line 1335 of ../packager/packagesystem.pas
   $00ABDC22 line 61 of lazaruspackageintf.pas
   $00496682 line 16 of ideinspector.pas
   $00825D91 line 4782 of ../packager/packagesystem.pas
   $00825BE8 line 4748 of ../packager/packagesystem.pas
   $0082B1B5 line 1407 of ../packager/pkgmanager.pas
   $0082C361 line 1643 of ../packager/pkgmanager.pas
   $0044B57A line 1427 of main.pp
   $00403214 line 107 of lazarus.pp

TagsNo tags attached.
Fixed in Revision31796, 31810
LazTarget-
Widgetset
Attached Files

Relationships

related to 0019800 resolvedFelipe Monteiro de Carvalho TTabControl broken 

Activities

Felipe Monteiro de Carvalho

2011-07-24 19:55

developer   ~0050124

> The tab control in question is used to contain a single component (the same
> component for all tabs). The component changes content depending on tab.

But the bug is not in the new TTabControl. A correct TTabControl cannot contain other controls.

The previous usage of TTabControl by this package was completely wrong and based on the previous wrong implementation of TTabControl.

Felipe Monteiro de Carvalho

2011-07-24 20:04

developer   ~0050126

Where is this TabControl declared? I searched for "TabControl" in the directories ideintf, ide, packager and designer and I couldn't find any place where a TTabControl is created.

Felipe Monteiro de Carvalho

2011-07-24 20:15

developer   ~0050127

Ok, I found it. It is components/ideinspector/maininspector.pas

But I am having a hard time to fix it because the IDE refuses to show this form without any error message =(

Felipe Monteiro de Carvalho

2011-07-24 20:26

developer   ~0050128

Does rev 31796 fix the issue?

Felipe Monteiro de Carvalho

2011-07-26 15:51

developer   ~0050182

Now that I reverted TTabControl, maybe the IDEInspector should be reverted to use it like before?

Felipe Monteiro de Carvalho

2011-07-26 16:12

developer   ~0050183

Martin, maybe you could take a look at this? I don't use this component...

Martin Friebe

2011-07-27 12:35

manager   ~0050205

Resolved, as changes were reverted.

Felipe Monteiro de Carvalho

2011-07-27 12:45

developer   ~0050206

But maybe now rev 31796 needs to be reverted?

Felipe Monteiro de Carvalho

2011-07-29 08:06

developer   ~0050250

Martin had already reverted it in rev 31810

Hans-Peter Diettrich

2011-07-31 14:46

reporter   ~0050306

>>
But the bug is not in the new TTabControl. A correct TTabControl cannot contain other controls.
<<

A Delphi TTabControl *can* contain other controls. The (now) TNewTabControl allows for that, at least on Win32. Problem there was only the misplaced check for ChildClassAllowed, which has to be moved into TPageControl.

>>
The previous usage of TTabControl by this package was completely wrong and based on the previous wrong implementation of TTabControl.
<<

It looks as if the previous implementation was more Delphi compatible. Please try to implement the compatible behaviour also with the other widgetsets.

Issue History

Date Modified Username Field Change
2011-07-24 18:40 Martin Friebe New Issue
2011-07-24 18:40 Martin Friebe LazTarget => -
2011-07-24 18:41 Martin Friebe Relationship added related to 0019800
2011-07-24 18:42 Martin Friebe Description Updated
2011-07-24 19:55 Felipe Monteiro de Carvalho Note Added: 0050124
2011-07-24 19:57 Felipe Monteiro de Carvalho Status new => assigned
2011-07-24 19:57 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2011-07-24 20:04 Felipe Monteiro de Carvalho Note Added: 0050126
2011-07-24 20:15 Felipe Monteiro de Carvalho Note Added: 0050127
2011-07-24 20:26 Felipe Monteiro de Carvalho Note Added: 0050128
2011-07-24 20:26 Felipe Monteiro de Carvalho Status assigned => feedback
2011-07-24 21:43 Felipe Monteiro de Carvalho Fixed in Revision => 31796
2011-07-24 21:43 Felipe Monteiro de Carvalho Status feedback => resolved
2011-07-24 21:43 Felipe Monteiro de Carvalho Resolution open => fixed
2011-07-26 15:51 Felipe Monteiro de Carvalho Note Added: 0050182
2011-07-26 15:51 Felipe Monteiro de Carvalho Status resolved => confirmed
2011-07-26 16:12 Felipe Monteiro de Carvalho Note Added: 0050183
2011-07-27 12:35 Martin Friebe Status confirmed => resolved
2011-07-27 12:35 Martin Friebe Note Added: 0050205
2011-07-27 12:45 Felipe Monteiro de Carvalho Status resolved => assigned
2011-07-27 12:45 Felipe Monteiro de Carvalho Resolution fixed => reopened
2011-07-27 12:45 Felipe Monteiro de Carvalho Note Added: 0050206
2011-07-29 08:06 Felipe Monteiro de Carvalho Fixed in Revision 31796 => 31796, 31810
2011-07-29 08:06 Felipe Monteiro de Carvalho Status assigned => resolved
2011-07-29 08:06 Felipe Monteiro de Carvalho Fixed in Version => 0.9.31 (SVN)
2011-07-29 08:06 Felipe Monteiro de Carvalho Resolution reopened => fixed
2011-07-29 08:06 Felipe Monteiro de Carvalho Note Added: 0050250
2011-07-31 14:46 Hans-Peter Diettrich Note Added: 0050306
2019-04-22 19:30 Martin Friebe Status resolved => closed