Archive for the ‘Delphi 2007’ Category
Posted by jpluimers on 2013/10/10
Still a C# 4.0 / .NET 4 feature that I need to investigate more deeply: ExpandoObject, partially because I had very bad memories of Variant support in Delphi.
So here are a few links.
First of all: since VB.NET already does late binding with the Object keyword, you cannot use ExpandoObject with Strict On in VB.NET 10.0 and up:
Now the C# links:
–jeroen
Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Delphi, 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, Development, Software Development | 5 Comments »
Posted by jpluimers on 2013/09/01
While working on my Delphi: First try on an XSD for .groupproj files, I bumped into an error `Namespace ” is not available to be referenced in this schema`.
I added a targetNamespace attribute to the GroupProj.xsd so the .grouproj files would use the right namespace.
That resulted into two funny errors:
- Namespace ” is not available to be referenced in this schema.
Visual Studio (which I normally use for editing XSD) would only throw this error on these elements:
<xsd:element ...>
So it would not throw them on nodes using the empty namespace.
That was really confusing!
- When validating .grouproj files using this GroupProj.xsd, I would get this error for all .groupproj files:
System.Xml.Schema.XmlSchemaValidationException: Type ‘<type>’ is not declared. (in this case for ‘<type>’ ‘ProjectType’).
That was odd too: the ‘ProjectType’ was indeed declared, and should be valid.
I could hardly find any information about the latter error, but the former gave a few useful hits.
Thanks User weston – Stack Overflow. for answering this: it made me smack to my head (like usual, a case of EBCAK). Read the rest of this entry »
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development, XML/XSD, XSD | Tagged: software, stack overflow, technology | 2 Comments »
Posted by jpluimers on 2013/08/31
Delphi introduced the .groupproj files to support MSBUILD.
I couldn’t find an XSD for it, but need to do some fiddling with those files, so I created one. It’s not very detailed, I think it gets most of the definition right.
The checkin is on my BeSharp.net mercurial repository on BitBucket:
First try on an XSD for .groupproj files.
–jeroen
via: jeroenp / BeSharp.net / commit / c122bbdef42e — Bitbucket.
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/07/18
I bumped into the below answer that I gave a while (what is 4 years in a developer’s life ) on StackOverflow.
It is about Delphi Design Patterns. Sepcifically the Factory Pattern, and explains how virtual constructors implement it.
They are one of the 3 corner stones on which the component based Delphi form designer and object inspector are built:
- Virtual constructors
- Properties (events are just a special form of property)
- Run-Time Type Information.
So here it goes: 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, Development, Software Development | 6 Comments »
Posted by jpluimers on 2013/07/09
Sometimes a generic answer to a specific answer gives people a lot more insight into what they actually want to accomplish than a specific answer.
Plus that the knowledge does not only apply to VCL in any Delphi version: it works in any development environment where you can draw.
That’s why I like this 2D transformation answer so much: 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 x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/05/29
In pre-Galileo versions of Delphi it was easy to run a .BAT or .CMD file as a main project file: just press F9.
Thanks to iManBiglary for posting how to do this in modern Delphi versions. Paraphrased:
Add the file path to cmd.exe (easieist is to add $(ComSpec) which expands the %ComSpec% environment variable) in the tools menu, with /c$EDNAME as the parameter.
In addition, you can tell the IDE to save your file before running the external tool with the $SAVE macro
One of the things you can do with this is add a project containing a batch file that starts to assemble your build results to create a deployment set.
–jeroen
via: Run batch file from Delphi IDE – Stack Overflow.
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/05/15
It is unwise to pass objects allocated in one framework over a DLL boundary to a different framework.
In the case of Using C dll in delphi return nothing, someone tries to pass an Interface to some memory in the C side over to Delphi.
Unless that interface is COM based, don’t do that!
In a more general way: don’t pass memory allocated on the DLL side over to the client side, no matter what kind of client you have.
From the DLL, either pass simple types, or fill buffers allocated at the client side.
Edit:
There was a nice Delphi DLL return string from C# … .NET 4.5 Heap Corruption but .NET 4.0 works? Explain please? – Stack Overflow question explaining in detail what to do for strings in a specific case: use the COM heap on the Delphi side using CoTaskMemAlloc (actually it uses the OLE task memory allocator as the Old New Thing explains).
–jeroen
via: Using C dll in delphi return nothing – Stack Overflow.
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Delphi, Delphi 1, 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, Development, Software Development | 5 Comments »
Posted by jpluimers on 2013/05/14
I had some notes on Delphi WSDL and SOAP peculiarities somewhere, but I misplaced them.
Luckily, I found some links that explain most of my notes well:
–jeroen
Posted in Conference Topics, Conferences, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Event, SOAP/WebServices, Software Development | Leave a Comment »
Posted by jpluimers on 2013/05/08

Lucida Console Sample (thanks Wikimedia!)
I’m in search to see if there is a better programmers font than the monospaced Lucida Console mainly to be used in Visual Studio, Delphi, the Windows console, Xcode and Eclipse. What I love about Lucida Console design is the relatively large x-height combined with a small leading (often called “line height”). This combines very readable text, and a lot of code lines in view. Lucida has two small drawbacks, see the second image at the right:
- The captial O and digit 0 (zero) are very similar.
- Some uppercase/lowercase character pairs are alike (because of the large x-height)
But, since the font hasn’t been updated for a very long time, lots of Unicode code points that are now in current fonts, are missing from Lucida Console (unless you buy the [Wayback] most recent version that has 666 characters from Fonts.com) Well, there are dozens of monospaced fonts around, so I wonder: which ones do you like? In the mean while, I’m going to do some experimenting with fonts mentioned in these lists:
A few fonts I’m considering (I only want scalable fonts, so raster .fon files are out):
I have tried Adobe Source Code Pro about half a year ago. That didn’t cut it: problem with italics in Delphi, and not enough lines per screen. [Wayback] New Open Source monospaced font from Adobe: Source Code Pro.
–jeroen
Posted in .NET, Adobe Source Code Pro, Apple, Delphi, Delphi 2007, Delphi XE3, Development, Encoding, Font, Lucida Console, Mac, Mac OS X / OS X / MacOS, Power User, Programmers Font, Software Development, Typography, Unicode, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Windows, Windows 7, Windows 8, Windows Server 2008 R2, Windows XP, xCode/Mac/iPad/iPhone/iOS/cocoa | 43 Comments »