The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

ÜberPDF printing using a Delphi like canvas

Posted by jpluimers on 2019/11/15

For my link archive, as it has a lot of goodies in the comments, especially on how to avoid bitmaps in PDF emission: [WayBack] We took PDF to a whole new level today Load create, or editing a PDF in 2 lines of code using a simple Delphi (like) Canvas! We added a PDFPrinter and… – Joe C. Hecht – Google+

–jeroen

Posted in Delphi, Development, EPS/PostScript, PDF, Software Development | Leave a Comment »

TTreeView: when HideSelection=True, use SetFocus() to update the current Selected state

Posted by jpluimers on 2019/11/14

Reminder to self: corner case, but sometimes useful. [WayBack] EDIT: Answered. The TTreeView.HideSelection was set to TRUE, so you needed TTreeView.SetFocus() to reflect in the UI the current state of TTreeView.sele… – Vin Colgin – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Links to alternatives for Delphi REST clients

Posted by jpluimers on 2019/11/13

A few good links to a few alternatives for the built in Delphi REST client [WayBack] Hi looking for good and complete tutorial/course how to create RESTFul services with Delphi. Or if anyone use Delphi for creating RESTFul services feedb… – Gordan Paunovic – Google+

–jeroen

Posted in Communications Development, Delphi, Development, HTTP, Internet protocol suite, JSON, REST, Software Development, TCP | Leave a Comment »

A multi index container: TIndexedStore – Martin C Harvey’s Software Pages

Posted by jpluimers on 2019/11/13

For single-indexed containers, you can use a generic TDictionary, for instance one of these:

Reminder to self: check out if there is a generic version of [WayBackA multi index container: TIndexedStore – Martin C Harvey’s Software Pages anywhere.

Edit 20191220 (thanks Thaddy!) article moved to [WayBack] A multi index container: TIndexedStore – Martin C Harvey’s Pages.

For instance as part of:

The original library has source code in a [WayBack] zip file.

Edit 20191220 (thanks Thaddy!) download moved to [WayBack] IndexedStore.zip.

I got there via:

–jeroen

Posted in Delphi, Development, Software Development | 5 Comments »

Links to debugging COM stuff for Office Automation in Delphi

Posted by jpluimers on 2019/11/12

From a long time ago, but recently I needed them again.

Note the .NET side is much much harder Revisited from the .NET side: Why doesn’t WINWORD.EXE quit after Closing the document from Delphi? (via: Stack Overflow).

[WayBack] Why doesn’t WINWORD.EXE quit after Closing the document from Delphi? – Stack Overflow

Read the rest of this entry »

Posted in Delphi, Development, Office Automation, Software Development | 2 Comments »

Working in a team? DprojSplitter might be helpful! | The Art of Delphi Programming

Posted by jpluimers on 2019/11/12

Reminder to self: split off the user settings from a Delphi .dproj so only the non-user settings get into your version control system.

Some of you are probably already using my DprojNormalizer plugin for Delphi, which tries to reduce the unwanted differences disturbing your version control system. It does this by forcing a dedicat…

So what about them?
DprojSplitter handles the current build configuration and current platform. In addition these settings are handled, too (found in CommonOptionStrs):

sDebugger_RunParams,
sDebugger_RemoteRunParams,
sDebugger_HostApplication,
sDebugger_RemotePath,
sDebugger_RemoteHost,
sDebugger_EnvVars,
sDebugger_SymTabs,
sDebugger_Launcher,
sDebugger_RemoteLauncher,
sDebugger_IncludeSystemVars,
sDebugger_UseLauncher,
sDebugger_UseRemoteLauncher,
sDebugger_CWD,
sDebugger_RemoteCWD,
sDebugger_RemoteDebug,
sDebugger_DebugSourcePath,
sDebugger_LoadAllSymbols,
sDebugger_LoadUnspecifiedSymbols,
sDebugger_SymbolSourcePath

Source: [WayBackWorking in a team? DprojSplitter might be helpful! | The Art of Delphi Programming

via: [WayBack] Oops! I did it again! This is my new IDE plugin – again targeted on dproj files. – Uwe Raabe – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

How to convert a Delphi enum or set to a JSON value, with different specific values…

Posted by jpluimers on 2019/11/07

As I will probably need this one day: [WayBack] How does one convert a Delphi enum to a JSON value, with different specific values? – CHUA Chee Wee – Google+:

eg, TEnum1 = (test1, test2, test3)

TSomeClass.FEnum := test1;

When converted to JSON, I’d like to see maybe
{"Enum": "Value1"} instead of test1

and test2 to "Godzilla", test3 to "Tiburon"

The solution is in his repository: github/chuacw/EnumJson:

After initially suggesting to look into [Archive.is] Serializing User Objects – RAD Studio, he based his solution on a set of clever tricks circumventing Delphi compiler limitations and bugs:

Later he extended the solution to include sets in additions to enums: [Archive.is] Persisting enumeration and sets to JSON – Chee Wee’s blog: IT solutions for Singapore and companies worldwide (via [Archive.isMade my JSON interceptor demo public. Now you can save your enum and sets to JSON, with customized output to boot! – CHUA Chee Wee – Google+)

Clever!

Hopefully this got Lars Fosdal some ideas to solve [WayBackJSON in Berlin – Can I persuade TJSon to treat “params” as it was a string and not an object for the TJsonRPC class? – Lars Fosdal – Google+

Enums with Delphi

Enums with Delphi and their mapping is a repeating topic, see for instance [WayBack] What’s the easiest (ie., least coding) way to map an enum to a const string and vice versa? (Can attributes be used on enum values yet?) eg., type TMyColor… – David Schwartz – Google+

It shows how much the Delphi language is in need of language enhancements as right now there are way too many open source libraries struggling with the same issues each working around them or providing solutions in slightly different way.

Three things immediately come to mind:

  • the NameOf that – analogous to TypeOf – gets the name of an identifier as a string
  • expose all RTTI for all enum types (especially the ones with non-contiguous values or starting at another value than ordinal zero)
  • allow for attributes on enum values

Some examples of libraries providing enumeration support:

Some more thoughts from a different perspective: [WayBackWhat’s New in Edge Rails: Active Record enums

–jeroen

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

Changing the order of TabSheets in a PageControl in Delphi – twm’s blog

Posted by jpluimers on 2019/11/06

Good to know this as the Structure View sometimes lets me down: modify the PageIndex position as it is less stable than the Object Treeview in Delphi 7 and below.

Via:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Next up: TPDFPrinter and TPDFCanvas Expect a high paced (and easy) update cy…

Posted by jpluimers on 2019/11/05

For my link archive: [WayBack] Next up: TPDFPrinter and TPDFCanvas Expect a high paced (and easy) update cycle for Ultra, with a constant stream of new goodies! Zero hassles – it … – Joe C. Hecht – Google+

–jeroen

Posted in Delphi, Development, PDF, Power User, Software Development | Leave a Comment »

When whas the global FormatSettings variable deprecated?

Posted by jpluimers on 2019/11/05

Reminder to self to check out when [Archive.isFormatSettings global variable of type [WayBackTFormatSettings was deprecated as it was only documented as of Delphi 2010 but available much much earlier.

–jeroen

via [WayBackdelphi – Is there a consistent global FormatSettings variable availabe? – Stack Overflow

Posted in Delphi, Development, Software Development | 2 Comments »