It's damn frustrating, this is twice in the last 2 hours. I'm not even doing anything weird, just editing a source file. I checked the ram usage of my workstation, it's at 600mb out of 4gb total. Rad Studio crashes more than any IDE I have ever used in my entire life.
No one needs to read this site. Publishing this content is meant to force me to research new things, thus helping me to grow as a developer. If you think the things I post about are cool, then well... cool. If not, no big deal.
Showing posts with label RAD Studio. Show all posts
Showing posts with label RAD Studio. Show all posts
Sunday, August 31, 2008
Rad Studio crashing again!
It's damn frustrating, this is twice in the last 2 hours. I'm not even doing anything weird, just editing a source file. I checked the ram usage of my workstation, it's at 600mb out of 4gb total. Rad Studio crashes more than any IDE I have ever used in my entire life.
Sunday, July 20, 2008
Special kind of error
I tried to cast an internal control to TwwDBGrid as a TwwCheckBox and use it's Checked property. All I can say is WOW!
Here's the follow on error
That is a special error. As in "Special Education".
Whoops, I still have more time!
For some odd reason, I thought that the competition ended on the 18th. It turns out it actually ends on the 22nd, so I still have more time to work on it. The next block of free time that I have will be on the 21st, so we'll see if I can work some magic to figure out WMI and COM before the actual deadline.
Labels:
darwinraceoflanguages,
delphi,
programming,
RAD Studio
Friday, July 18, 2008
Darwin Race of Languages - Day 4

So I've been defeated by COM and WMI. To me, what's missing in the Delphi world are comprehensive tutorials and documentation like you can find with MSDN and Sun (for Java). What I ended up trying to do was look at existing code that uses WMI in Delphi, and attempt to reverse engineer it. I have a reasonable understanding of the objects and techniques used in the sample code, but when I got stuck, I had no idea what was causing the problem. Unfortunately, the time ran out for the competition before I could make anymore headway.
Earlier in the competition, I posted about my usual steps when learning something new, for the Darwin Race of Languages, I got stuck on step 2, developing the proof of concept, by reverse engineering existing examples.
If anyone is interested in looking at the code I was working on, the entire project is in a zip file here. Note that I'm not sure if all the imports will be correct on anyone elses pc, as the paths were local to my pc. I can't really call the code "my code", since it was mostly a cut and paste from someone named ciuly. I also used as reference, this project from Planet Source Code, which interestingly enough had errors, but ran on my workstation. When I attempted to extract the code and place it in my project, I ran into the same EOleException that I had in ciuly's example. That leads me to believe that the issue lies somewhere in my project, but not in the sourcecode.
Labels:
darwinraceoflanguages,
delphi,
programming,
RAD Studio
Saturday, July 12, 2008
My Delphi Race of Languages Day 2
Whew, MSDN is always a tough read! So far all I have are a "Hello World" app, and I examined a sample project that I found here. That author uses ActiveX to query WMI, I think I may go the ODBC route as I'm more familiar with T-SQL. Here's a few screenshots of todays small progress.

Here's a screenshot of RAD Studio running inside of Parallels on OSX.

Here's a screenshot of the sample project files.
Here's a screenshot of the imports I did so that I can use WMI with my app. Note that there is an activex import there, I'm probably going to remove that and use ODBC as noted earler.
Here's a screenshot of my simple little hello world.
[edit]I'm not so sure on using ODBC now. I don't know if it's a good idea to assume that an end user will have MDAC installed on their machine.[/edit]
Friday, July 11, 2008
My Delphi Race of Languages day 1
I've checked out the progress of some of the other competitors, seems like my late start has put me behind by a few days. That's alright though. My usual approach to a problem that I don't understand, is to do the following:
- Use my google-fu to do some research
- Get a proof of concept working
- Design the actual application
- Testing and refinement
Labels:
darwinraceoflanguages,
delphi,
programming,
RAD Studio
I entered the Darwin Race of Languages

So my rantings on Delphi and RAD Studio sort of spawned a programming/IDE competition hosted here. I got an invite to compete, and I figure... why not? The worst that could happen is I become better at RAD Studio and Delphi, which is a good thing. I'm sure the critics that I have would love to tear apart my code, and I'm going to give them that chance!
Labels:
darwinraceoflanguages,
delphi,
programming,
RAD Studio
Thursday, July 10, 2008
Mea Culpa!
The problem is solved! It was caused by me forgetting that Delphi is case insensitive, so I had a var named cParsedFile, and I tried to instantiate the object with a "cParsedFile := CParsedFile.Create;". I am really glad that the problem is in my code. If the problem is my code, then I can fix it! Kudos to Jørn Einar, and Bart Roozendaal for helping me figure it out, and thanks to Animal, Lars Fosdal, Thomas Müller and everyone else who gave assistance! This feels like I won some sort of award, and now I give my thank you speech ^_^.
To make up for my earlier comment, where I stated that RAD Studio was made by monkeys, here is a pic proving that RAD Studio was NOT made by monkeys.

Screenshots of my Visibility Problem
Below are screenshots of a debugging session showing the visibility issue. I blacked out any proprietary code and information, hopefully still leaving enough code to show the problem I'm running into.
Here is my procedure, showing the var definition. Note that "global" is in the "uses" part of the implementation section.

Here we are in the constructor. Notice that now we are inside global.pas, this is the correct location for CParsedFile.Create.


The instant I hit "Step into" I get an access violation error. If you look at the code at the top of the constructor (above screenshot), you will see that it's nothing fancy, just a bunch of string assignments (these strings are defined in the class definition of CParsedFile in the implementation section of global.pas).


If I was referencing a separate var, or there was another definition of CParsedFile, why am I stepping into the correct constructor? If I edit my procedure so that "CParsedFile.Create" is now "global.CParsedFile.Create", and step through it, everything is fine. So you understand my frustration when:
- I can compile
- When I step through my code with the debugger, I get to the appropriate constructor
- I get a runtime error in the constructor
- This runtime error is fixed by prefacing the unit in front of my constructor call in my procedure.
Wow RAD Studio is fast
For the project that I participate in, I usually work remotely through logmein, and that has been my only experience with RAD Studio. Trying to solve my visibility problem prompted me to install RAD Studio on my MacBook Pro through Parallels on Windows XP, so that I could work on code that I own and can post freely online.
Holy crap RAD Studio is fast, even though I'm running it through a virtualized OS. Now I just need to buy more ram so I can stop using virtual memory so much. I guess OSX + Firefox + Parallels + Windows XP will eat up 2GB =P.
So I can mark up one win for RAD Studio, it definitely executes faster than Visual Studio.
See... my experiences with Delphi and RAD Studio aren't all bad.
Labels:
delphi,
OSX,
parallels,
programming,
RAD Studio
Tuesday, July 8, 2008
Read your guys' comments on my visibility issues in RAD Studio
Believe me, I'm reading through them. I've been busy today so I haven't been able to look at that section of code again, but I'll get to it in the next few days and see if I can figure out (with the help of your comments) what was going on in my code.
Subscribe to:
Posts (Atom)








