cnpack / cnwizards

CnPack IDE Wizards
http://www.cnpack.org
578 stars 140 forks source link

New DFM Editor CnPack #182

Open luapfr opened 1 year ago

luapfr commented 1 year ago

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

cnpack commented 1 year ago

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.

luapfr commented 1 year ago

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 commented 1 year ago

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