Recent

Author Topic: Missing components etc.  (Read 1648 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Missing components etc.
« on: March 05, 2021, 11:09:36 am »
Out of curiosity, I've just run an AVR boot loader written in Delphi (avrubd v4.5) through the Lazarus conversion tools. I want to be able to take a look at the code and overall layout before deciding whether it's really worth putting time into it, so the forms won't load and in practice I'm having to edit the lfm files to remove missing components (e.g. a hex editor which I can't locate).

Is there a way of replacing a missing component with a visual placeholder of some sort, so that the visual layout is preserved?

MarkMLl


« Last Edit: March 05, 2021, 05:48:47 pm by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Missing components etc.
« Reply #1 on: March 05, 2021, 11:59:14 am »
Is there a way of replacing a missing component with a visual placeholder of some sort, so that the visual layout is preserved?
The Delphi converter in Lazarus has Type Replacements. You can add your own types there.
Missing properties may cause some trouble. I am not sure.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Missing components etc.
« Reply #2 on: March 05, 2021, 12:30:50 pm »
If I select "Interactive" rather than "Automatic" replacement I think I can replace e.g. a hex editor component with a TMemo, and I could then go back to the original files and copy the properties in as text making it a useful placeholder.

However it looks as though it's only doing a partial conversion so e.g. a TComCombobox in a non-main form is left untouched, leaving the form unloadable (e.g. by F12).

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Missing components etc.
« Reply #3 on: March 05, 2021, 05:17:15 pm »
However it looks as though it's only doing a partial conversion so e.g. a TComCombobox in a non-main form is left untouched, leaving the form unloadable (e.g. by F12).
Oh, that sounds like a bug. The project converter should do them all.
It has been a while since I worked on the converter. I remember it worked reasonably well. Maybe an exception somewhere messes things up.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Missing components etc.
« Reply #4 on: March 05, 2021, 05:50:47 pm »
If anybody's interested and knows what they're doing I've tacked the Delphi project onto OP as a .zip file.

I really don't know whether it's worth converting: it's the PC end of an AVR boot loader with encryption etc. OTOH if it's a useful test of the converter...

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018