I need to get the name of the unit (namespace) of any TRttiType.
so far, I have tried the following.
1) using the PTypeData.UnitName, this solution works, but only when the TTypeKind is tkClass.
procedure ListAllUnits;
var
ctx : TRttiContext;
lType: TRttiType;
Units: TStrings;
begin
Units:=TStringList.Create;
try
ctx :...
In Delphi, if I have a simple class myClass and I pass an instance of it to a function with myFunction( myClass ), which is defined by function myFunction( myObject : myClass ) : Boolean...
Will a copy of myObject be made?
When I call methods of myObject in myFunction, will the original object be affected and modified too?
...
I need determine if a TRttiMethod is a function
so far, i wrote this function
Function IsFunction(QualifiedName,MethodName:string):Boolean;
Var
ctx : TRttiContext;
lType : TRttiType;
lMethod : TRttiMethod;
Begin
result:=false;
ctx := TRttiContext.Create;
lType:=ctx.FindType(QualifiedName);
if Assigned(lType)...
I am using Delphi7 ClientDataSet to read and write xml files for some of my data.
Howerver, when I want to browse this outside the program (double clicking the xml in Windows Explorer) I get the 'An invalid character was found in text content. Error processing resource' - even although the data reads and writes fine from within Delphi.
...
I want to present the user with a list of known file extensions for him to pick. I know that these are stored in the Registry under HKEY_CLASSES_ROOT usually like this:
.txt -> (default)="txtfile"
where txtfile then contains the information about associated programs etc.
Unfortunately that place in the registry also stores lots of oth...
Here's is my code:
type TNav = class(TPanel)
private
procedure CMMouseEnter(var AMsg: TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var AMsg: TMessage); message CM_MOUSELEAVE;
public
end;
type TForm1 = class(TForm)
...
procedure FormCreate(Sender: TObject);
private
public
end;
procedure TForm1.FormCreate(Sender: TOb...
I have Jordan Russel's Toolbar2000 toolbars that I create at runtime with an embedded TFrame and dock on the application main form. This frame has an embedded pane that in turn
contains other panels and various controls. So the structure is:
TTBDock
TTBToolbar
TFrame (align=alNone, Autosize=true)
TPanel 1 (align=a...
I have a database I have created in Delphi that’s still in the testing phase
I found it easy to give access to my database through Java in the form of a *.dll
but this is not just a standard database (its very cutting edge with Nodes).
It’s taken me a lot of learning to get to this point. I very much appreciate the help and thanks of thi...
Hi,
Im having problems using data from the host application.
I want to send a string through the dll into the host, then combine it with some data from the host app.
By just including the form in the uses clauses i can use methods to send data into the host, When the data is recived i try to add a lokal variable, this is when i get a ...
Hi, I have the following query:
WITH cte AS (
SELECT
windowId, frameIndx, elemIndx, comment,
ROW_NUMBER() OVER (PARTITION BY frameIndx ORDER BY elemIndx DESC)
AS
rn
FROM
dbo.translations
WHERE
windowId = 1 AND frameIndx IN (
SELECT
indx
FROM...
Hi, ive previously asked another questions about building my dll, but it seams like its heading in the wrong direction :) So I have reformulated and explained more her.
So what im trying to build is a dll that will work as an interface between my delphi program and some one else's C program.
What this dll must do is recive a String fr...
I wrote a program that uses OLE and it was working fine until I added some components which were important for my program, after that my program have problem when starts to work with OLE and raise this exception:
"EOleSysError
No more threads can be created in the system"
is there any way to requesting more threads or free u...
qryreg.SQL.Add('Insert into RegistreerTB');
qryreg.SQL.add('Name , Surname, E-mail, Password)');
qryreg.SQL.Add('Values ('+quotedstr(edtname.Text)+','+quotedstr(edtsname.Text)+','+quotedstr(edtemail.Text)+','+quotedstr(edtpassuse.Text)+')');
qryreg.ExecSQL ;
qryreg.SQL.Text := 'Select * from RegistreerTB';
qryreg.Open ;
This is the cod...
I noticed that there are a lot of IDE memory problems and this is a place where real answers to these issues are found. So.. I thought I would make a section available for answers to (at least) this question is, since I found no other to fix this problem on the net.
My problem was that I left my work space for a few hours and when I ret...
Hi, I'm a C programmer came across this Delphi function and have a few questions.
procedure Init(const key; size: Integer; filler: Byte = $FF); overload
variable key doesn't have a type specified, what is the type of it in this case?
What does the "$FF" means for the variable filler?
...
i'm using TwwDbLookupComboDlg component in delphi 7. I want to change the date format in the combobox (as shown below) from '1/1/2009' to 'Jan 2009', any idea?
...
Can I, from a modal form, activate an existing nonmodal window? I use Delphi.
In our application the users can edit reports in a nonmodal window. This is usually done by selecting "Edit reports" from the main window. But there is also a possibility to open a report from a modal print dialog. This leads to the following problem: A user o...
Hi, im trying to send a Windows message to my Delphi application, but im having problems with the FindWindow method:
im getting error id of 0 from the GetLastError method.
Im running Vista and from what ive read this error is common in XP or earlier versions, but should work fine in Vista or Win 7 (maybe i misunderstood ?).
This is ...
hi!
I have a system, I set it up as a normal with UAC, and in my delphi environment I compile my project named ka.exe, I create a installshield project for it.
setup and everything completes ok!
but whenever I start my program, it requires elevation and I don't have any clue why.
just to be sure installshield is not playing mindgames ...
I am using a Delphi procedure to Compact Access Database
Code sniphet of procedure is:
procedure CompactDatabase(pFullDatabasePathName : string; pLoginName : string = ''; pPassword : string = ''; pSystemDb : string = '');
var
JE : TJetEngine;
sdbTemp : String;
sdbTempConn : String;
sdbSrcConn : Stri...