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,366 other followers

Archive for the ‘Delphi’ Category

On my research list for Delphi use – FlowFinity and DreamFactory

Posted by jpluimers on 2018/04/25

For my research list:

–jeroen

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

Reminder to self: check out “Debugging helper for TDataSet” and “debugger TDataSetVisualizer” for Delphi

Posted by jpluimers on 2018/04/24

So I won’t forget to check these out:

Via  [WayBackI like programming in Delphi, but I don’t particularly like writing applications that work with database backends… – Thomas Mueller (dummzeuch) – Google+ (thanks Stefan Glienke)

Read the rest of this entry »

Posted in Delphi, Software Development, Development, Delphi XE2, Delphi 2010, Delphi XE, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Delphi 10 Seattle | 1 Comment »

How to embed a superscript Registered symbol in a Rave memo buffer.

Posted by jpluimers on 2018/04/24

Thomas Pfister came with a nice solution to this question:

[WayBack] Does anyone know how to embed a superscript Registered symbol in a Rave memo buffer? – Phillip Woon – Google+

Since Google has such bad indexing of G+, here is the solution:

procedure TForm4.RvSystem1Print(Sender: TObject);
const
  SuperscriptOn = RPTFPrefix + RPTFSuperscript + RPTFOn + RPTFSuffix; // from RpDefine.pas
  SuperscriptOff = RPTFPrefix + RPTFSuperscript + RPTFOff + RPTFSuffix;
var
  MemoBuf: TMemoBuf;
begin
  MemoBuf := TMemoBuf.Create;
  try
    MemoBuf.Text := 'Test' + SuperscriptOn + '®' + SuperscriptOff + ' Test';
    MemoBuf.PrintStart := 0.5;
    MemoBuf.PrintEnd := 8.0;

    with Sender as TBaseReport do begin
      PrintMemo(MemoBuf, 1, true);
    end;
  finally
    FreeAndNil(MemoBuf);
  end;
end;

–jeroen

Source: Does anyone know how to embed a superscript Registered symbol in a Rave memo …

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Tip for the doc team: make TMonitor.Enter docs more clear on non-blocking re-entry from the same thread

Posted by jpluimers on 2018/04/19

Even when the Delphi team was large, the documentation was lacking, so with the reduced Delphi team size, I don’t have high expectations of the below to get fixed.

But since much of the post Delphi 7 run-time library looks a lot like the .NET core, you can usually fallback to the Microsoft documentation.

Tip for the doc team: make http://docwiki.embarcadero.com/Libraries/en/System.TMonitor.Enter more clear. Especially that if the same thread calls TMonitor.Enter more than one time, it will allow entry without blocking as per System.Threading.Monitor.Enter Method (Object) documentation https://msdn.microsoft.com/en-us/library/de0542zz

(note that this got introduced in Delphi XE3: http://docwiki.embarcadero.com/Libraries/XE3/en/System.TMonitor.Enter)

–jeroen

via: [WayBack] Tip for the doc team: make http://docwiki.embarcadero.com/Libraries/Seattle/e…

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

Reminder to Self: `TProc` is incompatible with parameterless procedures on interfaces

Posted by jpluimers on 2018/04/19

I knew that methods on interfaces were not compatible with the procedure of object (like [WayBack] TProc)or function of object construct, but they are also not compatible with the reference to procedure or reference to function construct.

Via: [WayBack] I try to call an Interface method from TThread.Syncrhonize()…and Berlin don’t accept that… – Paul TOTH – Google+

If you want it fixed, vote for [RSP-13007] Interface methods are not assignable to anonymous method variable – Embarcadero Technologies (Thanks Stefan Glienke).

You can work around it with an anonymous method.

This won’t work:

program Project1;
{$APPTYPE CONSOLE}
uses
  SysUtils;
 
type
  ITest = interface
    ['{B5AD87E8-A3DF-4B83-BE14-997C2E76A06C}']
    procedure Run;
  end;
 
  TTest = class(TInterfacedObject, ITest)
    procedure Run;
  end;
 
procedure TTest.Run;
begin
  Writeln('PASS')
end;
 
var
  test: ITest; // <- change this to TTest and it compiles
  proc: TProc;
begin
  test := TTest.Create;
  proc := procedure begin test.Run; end; // <- this compiles
  proc := test.Run; // E2010 Incompatible types: 'TProc' and 'procedure, untyped pointer or untyped parameter'
  proc();
  Readln;
end.

–jeroen

 

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

 
%d bloggers like this: