View Issue Details

IDProjectCategoryView StatusLast Update
0013694LazarusIDEpublic2011-12-01 11:22
ReporterPhil Assigned ToMattias Gaertner  
Status closedResolutionfixed 
Product Version0.9.26.2 
Target Version1.0.0Fixed in Version0.9.29 (SVN) 
Summary0013694: Designer problem with custom control based on TCustomForm
DescriptionIf FormEditingHook.RegisterDesignerBaseClass is used to register a class based on TCustomForm, the IDE raises an exception in TCustomFormEditor.DeleteComponent because the component's designer form is not TCustomNonFormDesignerForm.

Yet TMainIDE.CreateDesignerForComponent uses the component itself as the designer form when the component is TCustomForm, so there's no way to associate a different designer.

I fixed it like this, in TCustomFormEditor.DeleteComponent:

  if (AForm<>nil) and (not (AForm is TCustomNonFormDesignerForm)) and (not (AForm is TCustomForm)) then

This look like debug code that perhaps should be removed. The following lines check again:

  if (AForm <> nil) and (AForm is TCustomNonFormDesignerForm) then

so there's no harm in AForm not being TCustomNonFormDesignerForm.


TagsNo tags attached.
Fixed in Revision21780
Attached Files


Mattias Gaertner

2009-05-17 02:59

manager   ~0027640

Can you provide an example?

Vincent Snijders

2009-08-07 12:29

manager   ~0029610

No feedback from reporter.


2009-08-11 19:09

reporter   ~0029741

I finally got access to Mantis/Free Pascal via a public library computer.

Here is an example:

Using SVN code or the .zip file from the Files section of the forum, install these two packages:


Choose File | New | ExtPascal Application. You should see the exception at some point.

Instructions are here:

Note you shouldn't have to generate or compile ExtPascal, just install these two packages.



Paul Ishenin

2009-09-20 08:49

manager   ~0030850

Sorry, I can't reproduce.

I have installed those 2 packages, create an ext pascal application, dropped some controls on the form, deleted them. I see no crashes, no bugs.

Maybe somehow fixed? Please give me more instructions to reproduce this bug.

Paul Ishenin

2009-09-20 08:59

manager   ~0030851

Oups, a crash occur on the IDE close.

Paul Ishenin

2009-09-20 09:20

manager   ~0030852

Please test and close if ok.


2009-09-21 16:46

reporter   ~0030879

Yes, I tested on Windows and it works fine.

I can't tell how extensive your change was to allow TCustomForm descendants in the designer. Apparently TJITForms items are now TCustomForm instead of TForm and also some changes to CustomFormEditor?

If they're not too extensive, would it be possible to merge this fix into 0.9.28? That would really help new ExtPascal users get up and running quickly with Lazarus since they would no longer have to manually edit customformeditor.pp in order to design Web apps in Lazarus!

Many thanks.


Issue History

Date Modified Username Field Change
2009-05-11 22:45 Phil New Issue
2009-05-11 22:45 Phil Widgetset => Win32
2009-05-12 09:57 Vincent Snijders LazTarget => 1.0
2009-05-12 09:57 Vincent Snijders Status new => acknowledged
2009-05-12 09:57 Vincent Snijders Target Version => 1.0.0
2009-05-12 09:58 Vincent Snijders Status acknowledged => assigned
2009-05-12 09:58 Vincent Snijders Assigned To => Mattias Gaertner
2009-05-17 02:59 Mattias Gaertner Note Added: 0027640
2009-05-17 02:59 Mattias Gaertner Status assigned => feedback
2009-08-07 12:29 Vincent Snijders Status feedback => resolved
2009-08-07 12:29 Vincent Snijders Resolution open => unable to reproduce
2009-08-07 12:29 Vincent Snijders Note Added: 0029610
2009-08-11 19:09 Phil Note Added: 0029741
2009-08-11 19:18 Vincent Snijders Status resolved => assigned
2009-08-11 19:18 Vincent Snijders Resolution unable to reproduce => reopened
2009-09-20 08:49 Paul Ishenin Note Added: 0030850
2009-09-20 08:49 Paul Ishenin Status assigned => feedback
2009-09-20 08:59 Paul Ishenin Note Added: 0030851
2009-09-20 08:59 Paul Ishenin Status feedback => confirmed
2009-09-20 09:20 Paul Ishenin Fixed in Revision => 21780
2009-09-20 09:20 Paul Ishenin Status confirmed => resolved
2009-09-20 09:20 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2009-09-20 09:20 Paul Ishenin Resolution reopened => fixed
2009-09-20 09:20 Paul Ishenin Note Added: 0030852
2009-09-21 16:46 Phil Note Added: 0030879
2011-12-01 11:22 Marc Weustink Status resolved => closed