Archive for the ‘Delphi 2009’ Category
Posted by jpluimers on 2019/02/27
There are six variations; only one can be active at a time:
Delphi Office 2000 Servers Package
Delphi Office XP Servers Package
Delphi Office 2010 Servers Package
C++Builder Office 2000 Servers Package
C++Builder Office XP Servers Package
C++Builder Office 2010 Servers Package
via: I cannot get MS Office sample automation server wrapper components. Neither of… [WayBack ]
More in depth article explaining all the nitty gritty details: There Can Only Be One! Handling Different Versions of Design Packages inside the IDE | The Art of Delphi Programming [WayBack ]
–jeroen
Posted in Delphi , Delphi 10 Seattle , Delphi 10.1 Berlin (BigBen) , Delphi 2005 , Delphi 2006 , 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 »
Posted by jpluimers on 2018/09/04
Just found some notes from 2013 for my research list that are still relevant:
Note that if you are using Smart Pointers, use the ones that Spring4D implemented in 2015 named Shared/IShared<T>/TShared<T>, see [WayBack ] Spring4D – Pascal Today and [WayBack2 ] Smart Pointers will be in Spring4D 1.2 .
–jeroen
Posted in Delphi , Delphi 2009 , Delphi 2010 , Delphi XE , Delphi XE2 , Delphi XE3 , Delphi XE4 , Delphi XE5 , Development , Software Development | Leave a Comment »
Posted by jpluimers on 2018/07/11
When accessing the VCL from multiple threads at the same time: adopted from …\DEMOS\THREADS\THRDDEMO.DPR
Great question a while ago:
[WayBack ] “Don’t access VCL from a background thread” – how to demo that? – Primož Gabrijelčič – Google+
For me, the ultimate way why not to access the VCL from a background thread is the precursor of the official threads demo that ships from Delphi 2 to Delphi XE6 in ...DEMOS\THREADS\THRDDEMO.DPR . where you’d think the thread isolation would be in ...DEMOS\THREADS\ThSort.pas but actually is in ...DEMOS\THREADS\SortThds.pas .
The first public showing of that demo did not include main thread protection. It originates from a session at the the 1995 Borland Developers Conference where Ray Konopka showed the below code from Bob Ainsbury.
That session reminded why this joke [WayBack ] Via the EKON20 sessions… – Jeroen Wiert Pluimers – Google+ was so funny: “When Ray Konopka enters the room you have a Raize condition. “.
The question above also made me find back this reference to BorCon95 in San Diego:
Read the rest of this entry »
Posted in Delphi , Delphi 10 Seattle , Delphi 10.1 Berlin (BigBen) , Delphi 10.2 Tokyo (Godzilla) , Delphi 2 , Delphi 2005 , Delphi 2006 , Delphi 2007 , Delphi 2009 , Delphi 2010 , Delphi 3 , Delphi 4 , Delphi 5 , Delphi 6 , Delphi 7 , Delphi 8 , Delphi x64 , Delphi XE , Delphi XE2 , Delphi XE3 , Delphi XE4 , Delphi XE5 , Delphi XE6 , Delphi XE7 , Delphi XE8 , Development , Software Development | 2 Comments »
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 »
Posted by jpluimers on 2018/04/18
Reminder to self that I one day need to write more about this enumerator:
[WayBack ] jeroenp / BeSharp.net / source / Native / Delphi / Library / Data / DataSetEnumeratorUnit.pas — Bitbucket
It’s not nearly as good as the one by Uwe Raabe, but I didn’t really update this code for about a decade as it has functioned well for me in the current state: in 2009 it was like [WayBack ] bo library – Source Code .
Code by Uwe is at [WayBack ] Dataset Enumerator Reloaded | The Art of Delphi Programming via [WayBack ] Refurbishing old code: http://www.uweraabe.de/Blog/2017/02/09/dataset-enumerator-reloaded/ – Uwe Raabe – Google+
A couple of years ago I wrote a two-part article about a dataset enumerator: A Magical Gathering – Part 1 and Part 2 . Well, things evolved a bit since then and I wondered how one would implement something similar given the current features of Delphi. Actually I am following here a suggestion from commenter Alan Clark.
So for now it’s just to document that my enumerator is there and that it works as intended.
I referenced an older version at [WayBack ] For-in Enumeration – ADUG as I used it at Spoken @ CodeRage III, December 1-5, 2008 on Delphi, database and XML related topics and Source: Conferences/2009/DelphiLive.2009/Smarter-code-with-databases-and-data-aware-controls .
A small video on how you use it is here:
VIDEO
It was back when Better Office and CodeGear still existed and we celebrated (late ) Gwan Tan’s 50th birthday.
O the days (:
More history:
–jeroen
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 | 2 Comments »
Posted by jpluimers on 2018/04/05
For a very long time I’ve discouraged people from using non-ASCII characters in identifiers. It still holds.
In the past, transliterations messed things up. Even with increased support for Unicode, tools still screw non-ASCII characters up.
Delphi is not alone in this (the most important one is the DFM view as text support), see this report: [RSP-16767] Viewing a form as text fails with non ascii control or event names – Embarcadero Technologies (you need an account for this, but the report is visible for anyone):
Viewing a form as text fails with non ascii control or event names Comment
Steps:
create a new VCL forms application
drop a label onto the form
change the name of that label to lblÜberfall (note the U-umlaut )
switch to view as text
exp: DFM content shown as text
act: first line is shown incorrectly (see screenhsot)
–jeroen
Source: [RSP-16767] Viewing a form as text fails with non ascii control or event names – Embarcadero Technologies
via: [WayBack ] Code of the day – – Thomas Mueller (dummzeuch) – Google+ :
function TNameGenerator.StrasseToStrasse(const _Strasse: string): string;
begin
Result := _Strasse;
end;
…
Strasse := StrasseToStrasse(_Strasse);
Read the rest of this entry »
Posted in ASCII , Conference Topics , Conferences , Delphi , Delphi 10 Seattle , Delphi 10.1 Berlin (BigBen) , Delphi 2005 , Delphi 2006 , Delphi 2007 , Delphi 2009 , Delphi 2010 , Delphi XE , Delphi XE2 , Delphi XE3 , Delphi XE4 , Delphi XE5 , Delphi XE6 , Delphi XE7 , Delphi XE8 , Development , Encoding , Event , Mojibake , Software Development | Leave a Comment »
Posted by jpluimers on 2018/04/05
Posted in Delphi , Delphi 10 Seattle , Delphi 10.1 Berlin (BigBen) , Delphi 2005 , Delphi 2006 , Delphi 2007 , Delphi 2009 , Delphi 2010 , Delphi 6 , Delphi 7 , Delphi XE , Delphi XE2 , Delphi XE3 , Delphi XE4 , Delphi XE5 , Delphi XE6 , Delphi XE7 , Delphi XE8 , Development , Software Development | Leave a Comment »
Posted by jpluimers on 2018/01/30
A while ago, I found out that [WayBack ] Toon Krijthe made a [Archive.is ] Delphi 2009 syntax sample which is a great complement to the DelphiAST parser given that Borland/CodeGear/Embarcadero/Idera never published one in the 22+years that Delphi is alive.
–jeroen
Posted in Delphi , Delphi 2009 , Development , Software Development | 6 Comments »
Posted by jpluimers on 2018/01/10
As a by-effect, this article seems to one of the few that shows where Delphi uses the .dres file extension introduced around Delphi XE.
Recently I had to play some notification sounds in a Windows Delphi application where the application deployment should be as easy as possible: preferable copying the EXE around.
Playing a sound file seems easy, especially if it is a [WayBack ] WAV file: just use the [WayBack ] PlaySound or the (older) [WayBack ] sndPlaySound API functions.
But if you start searching on the internet, you see lots of curious implementations for playing WAV resources through sndPlaySound .
The actual implementation is really really easy though, just make sure you follow the steps right and nothing can go wrong.
[WayBack ] The full source code is on my BeSharp.net repository , here is how to to it step by step:
The steps depend on the MMSystem unit, so most of the code translates back to [WayBack ] Turbo Pascal for Windows (yes, the 16-bit Pascal days when the MMSystem unit was introduced ) with the exception of the SND_SENTRY flag.
The thing that more recent Delphi versions made a lot easier is embedding WAV files as WAVE resources, more on that further on. Read the rest of this entry »
Posted in Borland Pascal , Delphi , Delphi 2 , Delphi 2005 , Delphi 2006 , Delphi 2007 , Delphi 2009 , Delphi 2010 , Delphi 3 , Delphi 4 , Delphi 5 , Delphi 6 , Delphi 7 , Delphi XE , Delphi XE2 , Delphi XE3 , Delphi XE4 , Delphi XE5 , Development , Pascal , Software Development , Turbo Pascal | Leave a Comment »
Posted by jpluimers on 2017/11/30
Note that the below solution works for any project raising the W1029 warning (not just from projects using Delphi Mocks) like
[dcc32 Warning] W1029 Duplicate constructor 'ClassName.ConstructorName' with identical parameters will be inacessible from C++
From my original text at [WayBack ] Get rid of W1029 warning in Delphi compile mode · Issue #106 · VSoftTechnologies/Delphi-Mocks · GitHub :
By default the compiler will emit warnings like these for projects when using either of the Delphi.Mocks.Behavior or Delphi.Mocks.Expectation directly or indirectly:
[dcc32 Warning] W1029 Duplicate constructor 'TExpectation.CreateOnceWhen' with identical parameters will be inacessible from C++
They’re harmless as DUnitX doesn’t support C++. This particular warning type cannot be disabled on the unit or source line level which means you have to disable it on the project level by either:
adding {$WARN DUPLICATE_CTOR_DTOR OFF} anywhere to your .dpr project file
modifying the the Project Options for your project (easiest is in the All configurations - All platforms target):
follow the path Delphi Compiler, Hints and Warnings in the treeview on the left
expand the Output warnings node in the listview on the right
set Duplicate constructor/destructor with identical parameters will be inacessible from C++ to Error
A screenshot of the second option is below.
Note that the spelling mistake in Duplicate constructor/destructor with identical parameters will be inacessible from C++ is how it is in the IDE, but that as Google search string it will give limited results, so here are some back-ground references:
Read the rest of this entry »
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 »