|
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.
|
|
|
|
|
Overloaded_Name wrote: There is this Embercadero RAD Studio but it is a 30-Day trial and after that, we have to buy it.
..take a look at Lazarus
Overloaded_Name wrote: Thanks for any heading.
The two most-used resources in my Delphi-days where undu.com[^] and Torry.ru[^].
Overloaded_Name wrote: I was planning to learn a little about Delphi
That would be worth investing 21 days[^].
Bastard Programmer from Hell
|
|
|
|
|
Hi Hi,
As mentioned by Eddy, a good place (if you just want to learn and play around with Delphi - or more specifically Pascal) to look at would be Lazarus, which uses FreePascal. It will get you on the right path and has the added benefit of being cross-platform as well..
Hope that helps
Cheers,
Glen Vlotman
"You cannot code for stupidity"
modified 28-May-12 18:39pm.
|
|
|
|
|
Look at this site - [^]. This has a lot of information on Delphi, including the essential Pascal which you need to learn.
|
|
|
|
|
Btw, has anyone here got this "Handbook"? I just want to hear some opinions about this one. Or anyone find it useful?
|
|
|
|
|
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.
[ps]reason to down vote?
modified 16-Jun-12 23:53pm.
|
|
|
|
|
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 3:32am.
|
|
|
|
|
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 6:44am.
|
|
|
|
|
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.
|
|
|
|
|
|
|
Has it really been that long?!?!?!?! It also means that now I am an old fart... considering I was coding in TP7 then D1, D3, D5, D7, D2006 (is anyone noticing a pattern here? )... *buys a walking stick*
btw... smags... I am very close to finishing my next article... It's taking me longer to write considering I have a deadline type thing going at the moment with work, but I hope you (and the rest of the community) will like it when I post it... Tis got to do with the fun-ish side of Delphi development...
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
|
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. 
|
|
|
|
|
I have an ISAPI application with a TWebModule running on IIS6. There's try/except and fine exception logging around every method. Every single request and it's response status are also being logged. About five times a week this happens:
1) TWebModule.OnException is called with "EInOutError: File not found". Mostly the error is logged by just one thread, sometimes by up to four threads at once. (The cause must be outside my code, because there are no lines outside try/except blocks.)
2) For a few minutes IIS answers thousands of request with status 500, though they are not logged by the ISAPI DLL. That means, the requests don't cause more exceptions in the TWebModule instances, they seem to just bounce off my IIS.
3) Finally there's a message in the event log that one worker process did not recycle in time.
4) For a day or two, everything runs fine again.
I guess the TWebModule instance is in some kind of blocked state, but IIS still tries to feed it with requests. So, I want to stop the thread in TWebModule.OnException. Is there a way to shutdown a single TWebModule, that means one IIS thread or worker process, without recycling the whole Application Pool?
Thanks a lot,
Corinna
|
|
|
|
|
Hi, Corinna,
I don't have experience with Delphi on server side, so the following response might be useless to your case.
The description makes me still wondering if the threads were crashed by unhandled exception from inside your codes. Just want to make sure there is no such code as XYZ.Create() left outside the try/except or try/finally blocks, as some Delphi components throw exceptions during construction.
|
|
|
|