View Issue Details

IDProjectCategoryView StatusLast Update
0038783LazarusConverterpublic2021-04-22 11:53
ReporterMimarSinan Assigned ToJuha Manninen  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version2.0.10 
Summary0038783: TBitBtn Import Loses Information
DescriptionImport a Delphi form using Tools | Delphi Conversion | Convert Delphi Unit to Lazarus Unit. Keep all defaults.

Any TBitBmp on the converted form will lose its Cancel, Default, Caption, and ModalResult properties.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetCocoa
Attached Files

Relationships

has duplicate 0026941 resolvedJuha Manninen Delphi conversion removes properties of TBitBtn 

Activities

Juha Manninen

2021-04-21 20:12

developer   ~0130501

Last edited: 2021-04-21 20:31

View 3 revisions

This sounds strange because there is not special treatment for TBitBtn.
All published properties in a LCL component are supported automatically, and TBitBtn publishes the properties you listed.
I tested with a simple LCL form. (The converter runs through that, too.) No problems there.
Please provide a simple test case made with Delphi. I don't have Delphi around now.

wp

2021-04-22 11:53

developer   ~0130508

Using Delphi XE 10.3 CE I created a simple project with several TBitBtn components:
- one with property "Default" set to true
- one with property "Cancel" set to true
- one with property "ModalResult" set to mrYes
- one with property "Kind" set to bkOK.
(Win 10/64 bit OS).

I converted this project with Laz trunk as well as with Laz 2.0.10, the version used by the reporter, no settings changed in the converter. Both versions are 32 bit and behave in the same way. I am getting prompted that the delphi name-space units (e.g. Vcl.Buttons) are not found, selected to comment out the occurencies. Other than that, the conversion succeeds. In the converted project I fixed the commented uses clauses by removing the Delphi namespaces (e.g. Vcl.Buttons --> Buttons).

Looked at the properties of the TBitBtn components --> they are as set in the original Delphi project -- i.e. I cannot reproduce the issue reported here.

There is still a problem with the converter, though: I tried to compile the converted project - there are a lot of error messages referring undefined widgetset symbols ("Undefined symbol: WSRegisterCustomImageListResolution" and many more). This is becaus the converter did not add the unit Interface to the uses clause of the project unit. After doing this, the project compiles and runs correctly.

Another problem is that the converted project has not checked "Use LCL scaling" and "Use manifest resource (and enable themes)".

I am attaching the original Delphi project as well as the converted Laz projects (removed the ConverterBackup to save space).

Issue History

Date Modified Username Field Change
2021-04-21 06:44 MimarSinan New Issue
2021-04-21 18:57 Bart Broersma Category Utilities => Converter
2021-04-21 18:57 Bart Broersma LazTarget => -
2021-04-21 18:57 Bart Broersma Widgetset Cocoa => Cocoa
2021-04-21 18:57 Bart Broersma Assigned To => Juha Manninen
2021-04-21 18:57 Bart Broersma Status new => assigned
2021-04-21 19:54 Juha Manninen Relationship added related to 0026941
2021-04-21 20:12 Juha Manninen Note Added: 0130501
2021-04-21 20:30 Juha Manninen Note Edited: 0130501 View Revisions
2021-04-21 20:31 Juha Manninen Note Edited: 0130501 View Revisions
2021-04-22 07:38 Juha Manninen Relationship replaced has duplicate 0026941
2021-04-22 11:53 wp Note Added: 0130508
2021-04-22 11:53 wp File Added: 38783 - BitBtn Delphi Conversion.zip