I'm looking for a way to control all business objects I create in my applications written in Delphi.
As an article on Embarcadero's EDN (http://edn.embarcadero.com/article/28217) states, there are basically three ways to do this. I'm mostly interested in the last one, using interfaces. That way, when the business object is no longer bei...
In other words: Does this work, i.e. is the encoding of the parameter taken into account when generating the unicode string result?
function Test: string;
var
Pattern: string;
Parameter: UTF8String;
begin
// ...
Result := Format(Pattern, [Parameter]);
end;
Or is it necessary to explicitly cast the parameters?
Result := Format...
Hello everyone!
Very recently I have come back to Delphi after a long pause and written a rather straightforward utility app my client requested to support an older release...
I know these days the size does not matter much, but it struck me as odd that the one-unit application, when compiled, amounted to 1'084'416 b executable. The on...
Hi,
How to escape the special characters when executing an SQL query, when it is executed from Delphi using TADOQuery or TADOCommand etc..
For example the "scope operator".
Query looks like this.
GRANT CONTROL ON SCHEMA :: dbo TO supervisor
Thanks & Regards,
Pavan.
...
Hello,
I have a project group containing two projects that share one source folder,but do different things.What I find strange is the use of 'project group',but I don't want to turn this a subjective question,thereby I directly ask you:
How do I run all the projects in a project group - is there a short way?
Thank you in advance!
...
I have an issues where I am trying to determine if a reference to an object is valid. But it seems to be returning strange results.
procedure TForm1.Button1Click(Sender: TObject);
var form1 : TForm;
ref2 : TControl;
begin
form1 := TForm.Create(nil);
form1.Name := 'CustomForm';
form1.Parent := self; //Main Form
form1.Sh...
Hello there,
The application I am now trying to support (a former creation of mine) is a complete mess, and so I programmed an extension to it as a separate executable which I then launch, call application.minimize; and WaitForSingleObject (the recently created process). Right after that I call application.restore to get me back to wher...
With DataSnap 2009 i seems to be possible to use a remote database connection in the client datamodule, using a TDSProviderConection and an associated TSQLConnection. The client side is easy to set up, I drop a TSQLConnection on the form and link it to the TDSProviderConnection component.
But what are the steps in the remote datamodule ...
Delphi 2009 imported the UPS WSDL without any errors, and I managed to invoke the web service with my account information and an example parcel ID. The response from the server is:
<detail>
<err:Errors xmlns:err="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1">
<err:ErrorDetail>
<err:Severity>Hard</err:Severity>
<er...
This Delphi code will show a memory leak for an instance of TMyImplementation:
program LeakTest;
uses
Classes;
type
MyInterface = interface
end;
TMyImplementation = class(TComponent, MyInterface)
end;
TMyContainer = class(TObject)
private
FInt: MyInterface;
public
property Impl: MyInterface read FInt write FI...
Hi,
My application uses unicode characters and i have several text fields where i want to restrict user from inputing special characters like :'";
begin
if not (Key in ['a'..'z','A'..'Z',' ','0'..'9',#13,#8]) then
Key := #0;
if Key = #13 then
bOk.Click;
end;
So at this point it lets user add spaces and use a b...
While debugging my application with Delphi 2009, I sometimes get the following exception occurring:
This only happens occasionally, but after pressing OK, then my IDE and program both may freeze. If I am lucky I can sometimes do a File/SaveAll in Delphi, but sometimes I can't. Either way I am stuck and then the only thing I can do is ...
Hi,
I have a TGroupBox as a parent and i want to place a button inside it, and make it so the button would stick to the top right corner of groupbox.
The problem is, TGroupBox does not have the method OnResize, so i don't know how to tell a button where should it move after groupbox was resized.
Is there any way to make it happen?
T...
I have an ActiveX control hosted in our application. The control was imported using Delphi Import component menu.
The ActiveX control contains an edit box for user input. When I run the control in its own sandbox application(not a Delphi app) the arrow keys work as expected moving the cursor within the edit control.
However when I run...
My question is below.
Here is my setup:
interface
uses windows, {...,} uPSComponent_Default, uPSComponent, uPSRuntime, uPSComponent_Controls;
TForm1 = class(TForm)
//...
PSScript1: TPSScript;
PSImport_Classes1: TPSImport_Classes;
PSImport_Controls1: TPSImport_Controls;
procedure PSScript1Compile(Sender: TPSSc...
Hi there,
I got some code that I share with another developer. I have a nice debugging module which I leave through out the unit tests but he doesn't have this, so it's a battle of adding and remove the code constantly.
Would be nice if there was a way we could use a condition (much like Delphi version or Unicode) like
{$IfDef MYCom...
Hi,
I'm developing the app which has input fields and whenever user enters the controll, extra panel is being generated with the buttons.
The buttons have captions representing special symbols like degree, greek symbols.
When the button is pressed, corresponding special character should be added to the input fields TEdit existing text...
I can change the editor font in RAD Studio 2009 under the [Tools][Options] Editor Options/Display settings form, but the list of fonts is very limited and does not show all the installed fonts. Is there any way to add fonts to the selection ?
There is a work around by setting the font name in the registry, under [HKEY_CURRENT_USER\Softw...
I'm just wondering if anyone else has come across this rather obtuse error. I have a procedure that looks loosely like this:
procedure dostuff();
begin
if session_started = true then // global var
begin
// do bunch of calculations
// goes on for a while
// then at the end we enable the save button
save_score.enabled := ...
I am trying to get rid of lots of warnings in a project after converting it from BDS 2006 to Delphi 2009.
The project needs a type library named MSHTML_TLB. The source file mshtml_tlb.pas is an incredibly large file (about 16MB and >440.000 lines of code) which is generated when the Type Library is imported into Delphi 2009.
This f...