BCEditor (& BCDragDrop) - a small adventure

After @GrahameDGrieve asked about a C to Delphi thing, I went and looked at GitHub - WouterVanNifterick/C-To-Delphi: C To Delphi converter

At 5yrs old, it put up a struggle. It wanted a TBCEditor and TBCDragDrop.

// – – – –
I went looking for the Editor, and the github page I went to looked promising.
BCEditor.JsonDataObjects needed a couple of LongInts changed to NativeInts, but otherwise fine.

But C2Delphi was complaining that the TBCEditor IDE component was missing properties it was expecting :

CompletionProposal.Font.Charset, CompletionProposal.Font.Color, CompletionProposal.Font.Height,
CompletionProposal.Font.Name,    CompletionProposal.Font.Style,  and

But on inspection, they could just be deleted out of the dfm file.

// – – – –
Looking TBCDragDrop lead me here: GitHub - delphioracle/Components-Backup-ONLY: Components for bonecode software.

It had 5 components :

BCComponent.DragDrop.pas,    BCComponent.MultiStringHolder.pas, BCComponent.WndProcHook.pas,
BCComponent.SkinManager.pas, BCComponent.TitleBar.pas

and the last two wanted “acntDX10Berlin.bpl” … which lead me to Alpha Controls.
I didn’t see anything there about free components, so I just deleted the last two, and it installed.

// – – – –
I haven’t used DWS (Delphi WebScript), and didn’t want to mess around further, so I turned off that flag, and C2Delphi compiled and ran. The core functionality of C → Delphi translation needs work. It should be fun to play with.

But in among all the google searching to get things running, I came across the back story to BCEditor, and BoneCode, and Lasse Rautiainen. [ Torry's Delphi Pages ]

Seems that the editor was created in ~2015, and has had a bit of history since then:



Buuuttt … HE’S BACK, it seems, with TextEditor (right up to date, as in hours ago) and it’ll be good to update C2Delphi to use TextEditor now and clear up any issues.

You could always replace the editor component with SynEdit. As for JsonDataObjects, the original can be found here GitHub - ahausladen/JsonDataObjects: JSON parser for Delphi 2009 and newer

1 Like

Thanks, @vincent, I had meant to mention SynEdit in all that as a possibility. I clearly typed too much. :slight_smile:

I hadn’t planned to spend that much time (an afternoon I guess) to get C2D up in D11, so I was looking for the path of least resistance. I’m assuming TextEditor might be a near-drop-in replacement. Maybe that’s wrong.

Regarding JDO, this is the (equivalent) line that needed modifying. It just had Longint.

function Realloc(var NewCapacity: {$IF Defined(USE_NATIVEINT)}NativeInt{$ELSE}Longint{$IFEND}): Pointer; override;