Delphi and 3rd party tools keep some of the settings in your %AppData% directory. Much more convenient than the registry as they are easier to read and modify when needed (also easier to damage <g>). We’ll start with an overview where various versions of Delphi store their configuration files, then show how the Favourites on the Welcome Page are stored, then end with an overview of BDS, Company Names and Product Names. Read the rest of this entry »
Archive for the ‘Delphi XE3’ Category
Files in your Delphi settings directory; How to relocate the Favourites on your Welcome page
Posted by jpluimers on 2014/10/14
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, History, Software Development | 4 Comments »
Delphi: RandomizeIfNeeded
Posted by jpluimers on 2014/10/07
Calling Randomize too often can make your Random numbers even less random.
Sometimes having the Randomize call in a unit initialization section is not practical.
Hence this little method that I think I first wrote back in the Turbo Pascal days:
procedure RandomizeIfNeeded();
begin
if RandSeed = 0 then
Randomize();
end;
–jeroen
Posted in Delphi, Delphi 1, 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 for PHP, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal | 7 Comments »
Delphi poor mans debugging trick: approximate the source location of an exception address
Posted by jpluimers on 2014/09/24
A while ago, I had a client with an exception on a workstation.
There was no permission to run a debugger on their system, or use something like MadExcept or Exceptional Magic in their code base.
The exception looked like this:
--------------------------- Application Error --------------------------- Exception EInOutError in module MyApplication.exe at 001656B1.File access denied. --------------------------- OK ---------------------------
These are the steps to get at the source line in an x86 Delphi program (I still have to try the x64, but presume it works similarly): Read the rest of this entry »
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | 3 Comments »
Continua CI Version 1.5 has been released (build 1.5.0.268); smaller, faster, loads of new features; Spring4D XE7 builds automated
Posted by jpluimers on 2014/09/10
I’m really happy that Continua CI Version 1.5 got released a few hours ago as per the Continua 1.5 released announcement.
It means that my Build Automation Session during the Dutch Delphi 2014 conference tomorrow can range from:
- build using MSbuild from the command-line
- build batch files
- build using a custom front-end
- build using Continuous Integration front-end
The session will explain lots of details about what various Delphi versions do, how to cope with dependencies, etc.
In the mean time, the preliminary Spring4D work on build automation is visible to guest users. Those include building for Delphi XE7 for the Win32, Win64 and OSX32 targets (in Debug and Release mode).
There is a huge list of Version 1.5 History @ Continua CI changes, which is partially quoted below.
For me these are the most important:
- in-place upgrade without having to do any changes on my part
- truckload of new features (including Delphi XE7, NuGet and Fake F# support)
- smaller
- faster
(as a side note: also FinalBuilder 7 was recently updated to support Delphi XE7)
In general, I like Continua CI a lot, most importantly because:
- it is very stable
- it has native support for a wide range of software development tools (including Delphi, Visual Studio and much more)
- supports DVCS (like Git/Mercurial) just as you expect it to
- if something breaks, you get a response and fix very very soon
You can download the new version through the Downloads @ Continua CI. These are the direct links:
http://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Server.Setup_x64_1.5.0.268.exehttp://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Server.Setup_1.5.0.268.exehttp://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Agent.Setup_x64_1.5.0.268.exehttp://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Agent.Setup_1.5.0.268.exe
For a breaking issue, there has been an important bug fix, so the new downloads are:
- http://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Server.Setup_x64_1.5.0.278.exe
- http://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Server.Setup_1.5.0.278.exe
- http://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Agent.Setup_x64_1.5.0.278.exe
- http://downloads.finalbuilder.com/downloads/continua/1.5/ContinuaCI.Agent.Setup_1.5.0.278.exe
I created an RSS feed through Page2RSS to watch any new releases of Continua CI.
Parts of the changes in 1.5.0.268 1.5.0.278
The full list of changes are at Version 1.5 History @ Continua CI.
Be sure to also look at the official Continua 1.5 released announcement.
Posted in .NET, Continua CI, Continuous Integration, Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development, Spring4D | 5 Comments »
Delphi: always watch the compiler Warnings
Posted by jpluimers on 2014/08/28
Quiz questions:
- Does the below unit test succeed or fail?
- Why?
procedure TestHResult.Test_EOleException;
var
OleException: EOleException;
IResult: LongInt; // == HResult
UResult: Cardinal; // == DWord
begin
IResult := $800A11FD;
UResult := $800A11FD;
try
OleException := EOleException.Create('message', $800A11FD, 'source', 'helpfile', -1);
raise OleException;
except
on E: EOleException do
begin
if E.ErrorCode = $800A11FD then
Exit;
Self.CheckEquals(E.ErrorCode, $800A11FD, 'E.ErrorCode should equal $800A11FD');
end; // E: EOleException
end;
end;
Posted in Conference Topics, Conferences, Delphi, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Event, Software Development | 2 Comments »
A way for a VCL TFrame to be notified when it is actually shown (via G+)
Posted by jpluimers on 2014/08/27
Interesting, as I didn’t think this was possible. Thanks Oliver Funcke!
Notification when a `TFrame` becomes visible.
TMyCommonFrame = class(TFrame)
private
FOnShow: TNotifyEvent;
procedure CMShowingChanged(var M: TMessage); message CM_SHOWINGCHANGED;
public
property OnShow : TNotifyEvent read FOnShow write FOnShow;
end;
...
procedure TMyCommonFrame.CMShowingChanged(var M: TMessage);
begin
inherited;
if Showing and Assigned(FOnShow) then
FOnShow(Self);
end;
–jeroen
via Is there any way for a VCL TFrame to be notified when it is actually shown to….
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | Leave a Comment »
Some notes on Word automation and showing Bookmarks
Posted by jpluimers on 2014/08/27
Though I’ve done this automation in Delphi, this applies to automation from any development platform. In this particular project, the documents used Bookmarks. Those have changed over time, so has the Word support for it.
From Word 2000 until Word you could disable the showing of Bookmarks by setting the ShowBookmarks property to False like this:
<br />ActiveDocument.ActiveWindow.View.ShowBookmarks := False;<br />
Well, when doing this, Office 2013 can throw an error like this:
EOleException: The ShowBookmarks method or property is not available because this command is not available for reading
ErrorCode: 0x800A11FD
Source: Microsoft Word
HelpFile: wdmain11.chm
The full error message does not give any useful search results. But a partial search finds a Word 2013 issue towards the top of the results:
sometimes Words opens the document in Reading layout. Reading layout does not allow all operations in Word 2013.
If a document is protected, and you try to change something you should not, you get an error message like this:
This method or property is not available because the document is a protected document.
Usually, Cindy Meister is very accurate. However this time here code
...ActiveWindow.View = wdPrintView
should have been like
...ActiveWindow.View.Type = wdPrintView
Of course you also have to save/restore this property while you are enabling the ShowBookmarks property.
Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Development, Office, Office 2000, Office 2003, Office 2007, Office 2010, Office 2013, Office Automation, Power User, Software Development, Word | Leave a Comment »
Some notes on Word automation and protected documents
Posted by jpluimers on 2014/08/26
Though I’ve done this automation in Delphi, this applies to automation from any development platform. In this particular project, I had to update Word documents. That is fine, unless your documents are protected. You can find out if a document is protected by probing the ProtectionType property of a Document object.
If a document is protected, and you try to change something you should not, you get an error message like this:
This method or property is not available because the document is a protected document.
If you have control of the documents or templates involved, then you can take the recommended steps from Document Handling with protected Microsoft Office Word Template:
Microsoft Office Word offers the possibility to enable document protection only to certain sections of a document. So you can place Bookmarks used by Dynamics AX in a section that is kept unprotected and the Form Controls in a section where Document Protection is enabled.
If you don’t, then you have to check for protection, unprotect, do the modifications, then re-protect the document. Read the rest of this entry »
Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Development, Office, Office 2000, Office 2003, Office 2007, Office 2010, Office 2013, Office Automation, Power User, Software Development, Word | Leave a Comment »
JEDI.INC got updated a few months ago: Delphi XE7 seems to be ahead…
Posted by jpluimers on 2014/08/22
While updating a project to a more recent version of Delphi, I also updated the JEDI.INC reference.
Note that since writing Delphi – finding the VERxxx define for a particular Delphi version: use JEDI.INC, the Delphi JEDI project moved from SoureForge to GitHub.
The fun thing: JEDI.INC got updated a few months ago to support Delphi XE7 provisionally.
Given the Delphi release cycle of twice a year, the Delphi Carpathia aka XE7 rumours this summer, I presume Delphi XE7 is near because of:
- The Source Forge RadStudioDemos trunk activitiy (based on my previous SF activity post).
- The root URL of the Delphi XE7 docwiki to become active.
- The mentioning of Delphi XE7 launch events at this Google Plus thread.
By then the list of Delphi Versionen | Delphi-Treff will likely also be updaed.
I’m anxious to see if the (Dutch + English) BIG Delphi Conference organized by Barnsten and Blaise from September 11-12 in the Netherlands will be part of the launch tour.
Anyway: here is the JEDI.INC portion with defines: Read the rest of this entry »
Posted in Delphi, Delphi 1, 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 XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 6 Comments »





