I have an incoming soap message wich form is TStream (Delphi7), server that send this soap is in development mode and adds a html header to the message for debugging purposes. Now i need to cut out the html header part from it before i can pass it to soap converter. It starts from the beginning with 'pre' tag and ends with '/pre' tag. Im...
What is the best way to share Delphi source files among projects?
Clarification: We want to use a single source file in multiple Delphi projects. We've been using our SCM tool to put the same file into multiple folders, but this is not a super-elegant experience and we are also considering migrating to a tool that doesn't support this....
What is the best way to convert an array of bytes declared as TBytes to a unicode string in Delphi 2009? In my particular case, the TBytes array has UTF-16 encoded data already (2 bytes for each char).
Since TBytes doesn't store a null terminator, the following will only work if the array happens to have #0 in the memory adjacent to it....
It certainly looks like a bug, but I only have the trial version so it may have been fixed.
ITestInterface = interface
['{9445CED8-4DBA-4EDB-9897-60980B438BE4}']
procedure Foo1;
procedure Foo2;
end;
TTest = class(TInterfacedObject, ITestInterface)
end;
The above will rightly not compile. but the following does!
ITestInterface...
A little example
TTest<T> = class
private
f : T;
public
function ToString : string;
end;
If is an object then this should work
TTest<T>.ToString;
begin
Result := f.ToString;
end;
But what happens when is say an integer? This would be ok in .net. of course.
I know it won't work, but how do I code this to work with objects A...
I use Ant to build Delphi applications (called from CruiseControl).
I want ant to recursively search through a directory tree looking for files *.dpr and when found call either a second build.xml, or preferable a macro or target, passing each of the found file names as a 'parameter'. I have found that I can use subant to find build.xml...
I am having a problem getting a list of fields from a query defined at run time by the users of my program. I let my users enter a SQL query into a memo control and then I want to let them go through the fields that will return and do such things as format the output, sum column values and so forth. So, I have to get the column names s...
I noticed today that in D2009 (with update 1), TStringStream.ReadString does not move the Position in the Stream anymore like it used to do up to D2007.
So, looping on MyStringStream.ReadString(10) would always read the 1st 10 chars of the stream instead of moving along and getting all the stream 10 chars by 10 chars.
I checked the doc,...
I need to hide a Windows form from the taskbar but I can't use WS_EX_TOOLWINDOW because I need the system menu and min/max buttons on the form's title bar.
If I switch the form to a tool window at runtime the form skinning is stuffed up. From searching on the Web I see that VB has a ShowInTaskbar property and I'm wondering if this woul...
Hi.
I got tired of trying Delphi every year hoping that I will find a stable version to upgrade from my good old Delphi 7.
Should I bother to try Delphi 2009? Or it is as unstable as the previous versions and should I wait until Delphi 2010?
Thanks
...
Hi,
Which component is best to use for receiving HTTP requests in Delphi application?
...
What Delphi coding standards document(s) do you follow?
Our company is looking at putting some better coding standards in place, to improve our code’s readability, reviewability, and maintainability. We’ve come across CodeGear’s “Object Pascal Style Guide”, but it hasn’t been touched in quite a while and I imagine a number of people ha...
You used to be able to get the package a Delphi component was installed under from the palette. That functionality doesn't seem to be in the lastest versions, though. How can I find which package a component belongs to under D2007 or D2009?
...
I'm planning to add XML support to application, but I'm not familiar with XML programming in Delphi.
Basically I need to create objects based on XML nodes and generate XML file based on objects.
Which XML component library I should use? Are there any good tutorials for XML with Delphi?
...
I have a Delphi 5 executable that calls into a .NET assembly via the free Delphi .NET code, and for the most part, this works great. However, one of the requirements of my application is that our clients be able to use this from a networked share as well as local. On my test machine, I can't get this to work, I just get an error messag...
I need recommendations on what to use in Delphi (I use Delphi 2009) to handle very large XML files (e.g. 100 MB) as fast as possible.
I need to input the XML, access and update the data in it from my program, and then export the modified XML again.
Hopefully the input and output could be done within a few seconds on a fast Windows mac...
How can I create unicode console application with Delphi 2009?
If I do like this:
{$APPTYPE CONSOLE}
uses
SysUtils;
begin
writeln('öüğşç سيمانتت');
end.
I get the following:
ougsc ???????
...
Delphi 2009 introduced a hierarchical system for project options configuration, where you set "base" options and then have different build styles with their own option sets. But can you extend the hierarchy even further? I do most of my coding with debug options on, of course, but sometimes there are special cases where I want a slightly...
I've got an in-memory dataset with several fields, one of which is a primary key that another dataset references as a foreign key. Thing is, the master dataset can have multiple references to the detail dataset. (This is modeling an object that contains a dynamic array of other objects.)
If there was only one of each sub-object, I cou...
I want to do something like this:
SQL.Text := Format('select foo from bar where baz like ''%s%''',[SearchTerm]);
But Format doesn't like that last '%', of course. So how can I escape it? \%? %%?
Or do I have to do this:
SQL.Text := Format('select foo from bar where baz like ''%s''',[SearchTerm+'%']);
?
...