cnwizards icon indicating copy to clipboard operation
cnwizards copied to clipboard

New DFM Editor CnPack

Open luapfr opened this issue 2 years ago • 3 comments

I created this other post https://github.com/cnpack/cnwizards/issues/180

However, I believe implementing it in the Delphi editor itself is difficult, not to say impossible.

I believe that creating a new DFM editor will be more interesting than what could be accessed using PopupMenu in DFM "View as Text CnPack"

PopupMenu DFM Delphi

using SynEdit "https://github.com/SynEdit/SynEdit/blob/master/Source/SynEditCodeFolding.pas" It is easy to do code folding and also complete the code The most difficult thing I see is integrating with Delphi because when you save it you have to detect if there are errors in DFM

Erro Salve DFM

luapfr avatar Oct 09 '23 13:10 luapfr

The key problem is, an "External“ editor is hard, almost impossible, to integrate in Delphi, and let Delphi think it's its editor itself, including code or dfm.

In a word, the Delphi Editor deeply integrated with Delphi itself.

cnpack avatar Oct 09 '23 14:10 cnpack

The key problem is, an "External“ editor is hard, almost impossible, to integrate in Delphi, and let Delphi think it's its editor itself, including code or dfm.

In a word, the Delphi Editor deeply integrated with Delphi itself.

I thought that since you can intercept Delphi's AutoComplete in PAS it would also be possible to do the same with DFM

luapfr avatar Oct 09 '23 14:10 luapfr

Taking a closer look, I think it wouldn't be complicated for a reason, the DFM will always have the same name as the PAS file and this way, when you click the other mouse button on the DFM and choose the option "View as Text CnPack" it will open the file The biggest problem is being able to Copile this DFM when saving it and closing this CnPack Editor

luapfr avatar Oct 09 '23 15:10 luapfr