 |
|
 |
When posting your question please:- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-fou
|
|
|
|
 |
|
 |
hello guys... I was planning to learn a little about Delphi. With a little research , I could just figure out that
- There is no Delphi Platform for Delphi Development similar to VC# 2010 Express Edition for C# Development.
There is this Embercadero RAD Studio but it is a 30-Day trial and after that, we have to buy it. So what's the starting point and which book (or any online tutorial) you would suggest. Thanks for any heading.
This world is going to explode due to international politics, SOON.
|
|
|
|
 |
|
 |
Hi, Welcome to Delphi community.
If you want to be familiar the language first, there are some other pascal compilers available. but I would suggest you use this Embercadero RAD Studio, so that you can play around with Delphi language, IDE, VCL, etc. And you can also access to its big source code depository. You will learn a lot from it.
As for books. I don't have any for recommendation. (unless you want to do some COM programming in Delphi )
Official web site has some tutorials to begin with. RAD Documentation is also a good place to visit for both references and tutorials.
These two web sites are good for references too, Delphi Basics and Delphi About. Some contents are old, but 99% are good.
Dr.Bob is also neat resource.
Last, don't forget here if you have any problem.
|
|
|
|
 |
|
 |
smags13 wrote: but I would suggest you use this Embercadero RAD Studio
Thanks for the reply. But that's what I was talking about. It is not free. I mean for beginners, is there no solid platform where I can learn at least basic GUI programming?
This world is going to explode due to international politics, SOON.
|
|
|
|
 |
|
 |
My suggestion would be the same, since Embercadero Delphi is the only reliable IDE for GUI programming in Delphi, from my point of view.
You could ask for an academic license if you are qualified. CodeGear Academic Program[^]
Let me know how it goes.
|
|
|
|
 |
|
 |
function TAclasencode.BufToDataBIN(const Buf: TByteDynArray; iStartPos,
iLen, iDec: Integer): Variant;
const
DefaultLen = 8;
var
i : Integer;
iTmp : Int64;
arr : array[0..7]of Byte;
pInt64 : ^Int64;
fTmp : Double;
begin
fTmp := 0;
try
FillChar(arr,8,0);
if (Buf[iStartPos] and $80=$80) and (not IsCardinal) then
begin
if Negative then
begin
for I:=0 to iLen-2 do arr[I]:=(Buf[iStartPos+iLen-1-I] xor $FF);
pInt64:=@arr[0];
iTmp:=pInt64^+1;
end else
begin
for I:=0 to iLen-2 do arr[I]:=(Buf[iStartPos+iLen-1-I]);
pInt64:=@arr[0];
iTmp:=pInt64^;
end;
fTmp:=iTmp;
fTmp:=fTmp/Power(10,iDec);
fTmp:=0-fTmp;
end else
begin
for I:=0 to iLen-1 do arr[I]:=(Buf[iStartPos+iLen-1-I]);
pInt64:=@arr[0];
iTmp:=pInt64^;
fTmp:=iTmp;
fTmp:=fTmp/Power(10,iDec);
end;
finally
Result := fTmp;
end;
end;
|
|
|
|
 |
|
 |
Please edit the above code and put it between <pre> tags so it is readable. Also expalin what your problem is and what help you require.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
 |
|
 |
Ha, I wouldn't grab your thought if I didn't come across your post in Quick Answer section. Please edit your post here so that other people would understand.
Ok, first the function might have overflow issue, depending on the logic, and it is not exception safe, leading to unexpected results. But it's nothing to do with your question, so I will pass this part.
I assume
1. TByteDynArray is array of Byte. if it's not, the following might be useless.
2. and endian representation is the same on all machines where your codes will run.
double BufToDataBin(byte[] Buf, int iStartPos, int iLen, int iDec)
{
const int DefaultLen = 8;
double fTmp = 0;
Int64 iTmp = 0;
try
{
byte[] arr = { 0, 0, 0, 0, 0, 0, 0, 0 };
if ((Buf[iStartPos] & 0x80) == 0x80 && !IsCardinal) {
if (Negative) {
for (int i = 0; i <= iLen - 2; ++i)
{
arr[i] = (byte)(Buf[iStartPos + iLen - 1 - i] ^ 0xFF);
}
iTmp = BitConverter.ToInt64(arr, 0);
}
else
{
for (int i = 0; i <= iLen - 2; ++i)
{
arr[i] = (byte)(Buf[iStartPos+iLen-1-i]);
}
iTmp = BitConverter.ToInt64(arr, 0);
}
fTmp = 0 - iTmp / Math.Pow(10, iDec);
}
else
{
for (int i = 0; i < iLen; ++i)
{
arr[i] = Buf[iStartPos+iLen-1-i];
}
iTmp = BitConverter.ToInt64(arr, 0);
fTmp = iTmp / Math.Pow(10, iDec);
}
}
catch
{
}
return fTmp;
}
Further optimization might be requested.
|
|
|
|
 |
|
 |
how to communication seerial RS232 to USB
|
|
|
|
 |
|
 |
Hi,
If you are working on Windows system, have you looked into CreateFile() API and Overlapped I/O? Those might help.
|
|
|
|
 |
|
 |
hi
as you know, to declare a custom math function, we can do:
function myfun(x:real):real;
begin
myfun=x*sin(x)+1;
end;
and it works perfectly. BUT if we want user declare his function during running app, how can we do it??
Thanks.
|
|
|
|
 |
|
 |
If you want end users (like software users) to define the function body while using your software, the first thing coming into my mind is some scripting tool.
If you want your clients (if you define some library package) to define the function body, you could use function pointer.
Can you describe more about your project or your thought?
|
|
|
|
 |
|
 |
Once upon a time the Timex Sinclair computer used an interpreted BASIC that would allow its user to type in a math function as a string and then have the string evaluated to give the answer to the function. Quite cool. The BASIC in the Commodore 64 lacked that feature. Compiled languages, like Delphi's implementation of Object Pascal, quite often don't provide the ability to evaluate the values of strings as expressions nor give one a built in way to define functions/procedures at run time right out of the box. But, libraries like this one: http://tpsystools.sourceforge.net will give you the ability to key in a function and evaluate it. You'll want to use the TStExpression component and/or the TStExpressionEdit component. These are found on pages 316 and 327, respectively, in the SysTools.PDF manual, available with the library from SourceForge. There's a TON of other useful things in SysTools too. Thanks TurboPower!
|
|
|
|
 |
|
 |
Hi Guys,
I've not had this problem before but since I re-installed the OS on both my laptop and desktop
I've been unable to compile properly.
My laptop is running 32bit XP Pro and my desktop Win7 Pro. Delphi has been set up on both after a clean install of both OS's. I have used the default installation for Delphi 2007 on both systems and the same components have been installed on both.
Everything seems to compile ok and I have the "Build with runtime packages" ticked and have tried it unticked as well.
When I try to run my app on other PC's it keeps looking for various BPL files. it starts by looking for rtl100.bpl but when I move that into the systems path then it looks for another bpl and another etc..
They are supposed to be embedded into the app but no matter what I do it just won't happen.
Has anyone else experienced this? Could it be a registry problem?
Jerbear! A Delphi Dabbler!
modified 8 Mar '12.
|
|
|
|
 |
|
 |
If you are building the project on your Win7 box, make sure that you are running Delphi as administrator. I had issues before with the security features in Win7 that gave me endless hassles until I did that.
Hope that helps m8
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
Thanks for replying Glen.
I'll give that a try but somehow I don't think that's the problem. I have exactly the same setup on my XP Pro laptop and it's giving the same problem.
|
|
|
|
 |
|
 |
I use Delphi 2009 and never have this kind of issue. But yeah, with "Build with runtime packages" unchecked, Delphi should have embedded all needed packages into you app, and there is no dynamic link required.
Did you try creating a simple Form Application where there is only a plain Form, with "Build with runtime package" unchecked? (it worth trying even though, as you mentioned, it seems to compile OK with your codes)
By the way, do you use customized BPLs or purchased BPLs inside the codes?
modified 11 Mar '12.
|
|
|
|
 |
|
 |
Hi Smags13,
Well it seems the problem relates to TMS Component Pack. I've had quite a few problems with this component pack since I purchased them a couple of years ago.
Had trouble installing on Delphi 5, 7, 2005 and now 2007.
They never seem to install correctly first time.
I'm going to have to uninstall, clean out all references to them and re-install them again.
All BPL's are purchased....
|
|
|
|
 |
|
 |
Yeah, we've been keeping experiencing weird issues using Delphi. But I'm happy you find the problem.
|
|
|
|
 |
|
|
 |
|
 |
That was indeed a (unsigned int)-1 time ago.
How is going with the article. It's about gaming, correct? My next project might more or less relate to GDI (or openGL), so I'm really, as always, looking forward it.
|
|
|
|
 |
|
 |
Let's do it
Oginiza
The Chief Priest of Delphi
|
|
|
|
 |
|
 |
Because if, we even exist and we are here.
I work with Delphi 2007 vs PostgreSQL Server, and everything is solved very well.
Charmed I will read the articles and I will respond in those that he can and have knowledge to make it
good bye
|
|
|
|
 |