Is there any free HTML creating documentation tool that fully understands Delphi 2009 features like generics and anonymous methods?
I tried DelphiCodeToDoc but it crashes while parsing the source code.
How i can parse and extract the parameters from an SQL Query using delphi?
example :
from this query
SELECT * FROM MyTable
WHERE Field1=:Param1
AND Field2=:Param2
AND (Field3=:Param3 OR Field4=:Param4)
i want to obtain
Param1
Param2
Param3
Param4
Thanks in advance.
Hello,
I found great explanation about the new RTTI in Delphi,but I don't understand one important thing about all I have read so far - Where can I use that?
What is it supposed to replace?
Thanks in advance.
Hello,
The formatter in Delphi 2010 is really an annoying thing to me.
I prefer formatting my code manually.
I believe I do it better.
How can I disable it?
NOTE: Answers on why I don't use it in the first place will not be accepted. I need it switched OFF. Nothing more, nothing less.
Thank you.
Any suggestion for a good unicode string library for Delphi 2010? Such thing as class that would contain a collection of independent functions, basically an encapsulation of functions that manipulate strings (ex: Trimlike, Character removal, Positional, Sub-string, Compare, Informational, Case, Replacement, Manipulation functions etc. ).
Thanks
Hi, I've the Delphi Prism command line compiler... is there a free IDE that I can use? Must have intellisense etc just a plain editor no drag-drop required.
I am working to make a basic file database, but I couldn't find the true codes.
Can anyone help me to save an exe file to sql database after read, download and use when I need it? With Delphi
Hello.
How to get back integrated source code formatting back to Delphi? I suppose I disabled some package or something and there is no more an option in Edit menu to format source. What package should I get back installed to have it on again?
Hi,
I want to have file combo box in delphi.
It must behave like this:
If i enter C:\ in combo box, it should show all the files & folders in C: Drive
If i proceed further i.e., if i enter C:\Pro, then all the files & folders starting with C:\Pro should be shown in combo box.
Simply it should behave like the File Name Combox Box that will come while using save dialog box
I need a way to have a label (or something like it) print sideways.
Sadly I am using Delphi 5. Is there any controls / mechanisms that anyone knows of to do this?
Purely as an exercise at home, aimed to better understand some language basics, I tried to reimplement the Ord function, but I came across a problem.
In fact, the existing Ord function can accept arguments of a variety of different types (AnsiChar, Char, WideChar, Enumeration, Integer, Int64) and can return Integer or Int64.
I can't figure out how to declare multiple versions of the same function.
How should this be coded in Delphi?
I'm using Zeos 7, and Delphi 2K9 and want to check to see if a value is already in the database under a specific field before I post the data to the database.
Example: Field Keyword
Values of Cheese, Mouse, Trap
tblkeywordKEYWORD.Value = Cheese
What is wrong with the following? And is there a better way?
zQueryKeyword.SQL.Add('IF NOT EXISTS(Select KEYWORD from KEYWORDLIST ='''+
tblkeywordKEYWORD.Value+''')INSERT into KEYWORDLIST(KEYWORD) VALUES ('''+
tblkeywordKEYWORD.Value+'''))');
zQueryKeyword.ExecSql;
I tried using the unique constraint in IB Expert, but it gives the following error:
Invalid insert or update value(s): object columns are
constrained - no 2 table rows can have duplicate column values.
attempt to store duplicate value (visible to active transactions) in unique index "UNQ1_KEYWORDLIST".
Thanks for any help
-Brad
The Exception class in Delphi 2009 received a number of new features. A number of them are related to getting a stacktrace:
property StackTrace: string *read* GetStackTrace;
property StackInfo: Pointer read FStackInfo;
class var GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer;
class var GetStackInfoStringProc: function (Info: Pointer): string;
class var CleanUpStackInfoProc: procedure (Info: Pointer);
Has anyone used these to obtain a stack trace yet? Yeah, I know there are other ways to get a stack trace, but if it is supported natively in the Exception class I would rather leverage that.
Update: There is an interest blog post about this. Covers it in a lot of depth.
Hi!
Is there a Delphi-5 solution to easily integrate single-file storage into existing code? I would like to have files like Java *.jar or Openoffice document files which are zipped/compressed files and folders but with their own file extension.
Edit:
I know some ZIP capable components but in a nutshell I want to access files within the "container" and use normal file handling routines on them (eg. TStringList.SaveToFile). Any overhead about compress/uncompress should be handled by the component.
It's Delphi seven and I want the equivalent of strtok().
Specifically, I have a DFM as a string (pulled from a MySql database) and I want to split it into lines in a TStringList.
It looks something like this ...
'Oject Form1: TScriptForm'#$D#$A' Left = 0'#$D#$A' Top = 0'#$D#$A' Align = alClient'#$D#$A' BorderStyle = bsNone'#$D#$A' ClientHeight = 517'#$D#$A' ClientWidth = 993'#$D#$A' Color = clBtnFace'#$D#$A' Font.Charset = DEFAULT_CHARSET'#$D#$A' Font.Color = clWindowText'#$D#$A' Font.Height = -11'#$D#$A' Font.Name = 'MS Sans Serif''#$D#$A' Font.Style = []'#$D#$A' OldCreateOrder = False'#$D#$A' SaveProps.Strings = ('#$D#$A' 'Visible=False')'#$D#$A' PixelsPerInch = 96'#$D#$A' TextHeight = 13'#$D#$A'
Yes, there is a version 2009. I know Delphi has a big community since years (10 plus)and I believe you could create native windows exe before Visual Basic got to speed (with all its dll's nighmare). But is it future-proof ? Is there a need or market for a non-crossplatform native all-in-one executable ? Will Embarcardero ex Codegear ex Borland continue to push it ? Why is it so expensive ? Who (non company) can afford it, in order to learn it ?
I am trying to store a set of values in delphi, but i want to be able to address them using their name, instead of an assigned number.
For example, an array of 'OldValues' would let me do
OldValue[1] := InflationEdit.Text;
Ideally however, i would like to have a value stored in 'Data.Inflation.OldValue' for example. For each identifier, such as Inflation, there is an OldValue, NewValue and StoredValue. There are about 12 of these identifiers.
Is there some way i could store the values like this? that way i could then do something like:
Data.Inflation.NewValue := Data.Inflation.OldValue;
Data.Inflation.NewValue := InflationEdit.Text;
In my Delphi Project i want to have a 'Settings' button that when clicked, opens a second form (i think this is the correct term, i essentially want a new window to open) for settings.
When the user has finished changing the settings on this new form, i want the form to close on a button click.
The settings the user types in will also need to be accessible to the first, 'main' form.
So, for example, if my programme consisted of a main form, that calculated 'A' + 'B' (A and B being integer variables), with the settings form allowing the user to set values for A and B, how would i do this?
Let's say I have a record TQuaternion and a record TVector. Quaternions have some methods with TVector parameters. On the other hand, TVector supports some operations that have TQuaternion parameters.
Knowing that Delphi (Win32) does not allow for forward record declarations, how do I solve this elegantly?
Using classes is not really an option here, because I really want to use operator overloading for this rare case where it actually makes good sense.
For now I simply moved these particular methods out of the records and into separate functions, the good old-fashioned way. Better suggestions are most welcome.
Hi there.
I'm learning Delphi Prism, and i don't find how to write the following code with it :
type
TRapportItem = record
Label : String;
Value : Int16;
AnomalieComment : String;
end;
type
TRapportCategorie = record
Label : String;
CategoriesItems : Array of TRapportItem;
end;
type
TRapportContent = record
Categories : array of TRapportCategorie;
end;
Then, somewhere, i try to put items in the array :
rapport.Categories[i].Label:=l.Item(i).InnerText;
But it doesn't work.. Can someone enlight me?
Thanks!
I created a function similar below in delphi code. but it wont work. What is the proper way to convert this?
char* ReadSpeechFile(char* pFileName, int *nFileSize)
{
char *szBuf, *pLinearPCM;
int nSize;
FILE* fp;
//read wave data
fp = fopen(pFileName, "rb");
if(fp == NULL)
return NULL;
fseek(fp, 0, SEEK_END);
nSize = ftell(fp);
//linear
szBuf = (char *)calloc(nSize, sizeof(char));
fseek(fp, 0, SEEK_SET);
fread(szBuf, sizeof(char), nSize, fp);
fclose(fp);
*nFileSize = nSize;
return szBuf;
}