Archive for the ‘Delphi’ Category.
May 24, 2010, 10:18 am
A couple days ago, I got an email from a member of the AnyDAC dev team. They make a set of professional data-access components for Delphi, and they’re looking for feedback and publicity. They were willing to give me a free license, worth about $400, if I’d take the time to evaluate their components, provide some feedback and suggestions, and write up a few reviews on here. Apparently they’re particularly interested in getting some focus on their in-memory dataset, DatS, which isn’t documented particularly well and doesn’t get used much. Continue reading ‘I think I just got sponsored’ »
May 10, 2010, 8:29 am
This time last year, I was getting ready to take a plane down to California to attend the DelphiLive! conference, where I’d been invited to speak about developing games in Delphi. This year, it’s been pushed back a few months, to be held in late August instead of mid-May, and I just now got the acceptance email from the organizers. Looks like I’ll be presenting two sessions this year: “Using extended RTTI to make your life easier,” and “Game engine development in Delphi.”
Continue reading ‘Going to DelphiLive! again.’ »
April 21, 2010, 1:56 pm
A lot of the UI design for the TURBU editor is based on data-aware controls bound to client datasets. I was trying to build a new form this morning that required me to filter one of the datasets. Problem is, that would break other things that expected it not to be filtered. Well, that’s not such a big problem, because TClientDataset has an awesome method called CloneCursor that lets you set up a second client dataset that shares the first one’s data store, but with independent view settings. So I used a cloned dataset, and immediately got an exception when I tried to run. The control I was using couldn’t find the field.
Continue reading ‘Adding non-data fields to a client dataset’ »
April 9, 2010, 4:50 pm
I’ve always been a big fan of Apple’s. My first computer was an Apple IIe, and finding a copy of BASIC on there was what first got me into programming. A good percentage of the modern user interface concepts we take for granted today were invented by Apple back in the 1980s. (Yes, I know, they got the basic concepts from Xeroc PARC, but a lot of their work was their work, not Xerox’s.) They’ve always been one of the major drivers of innovation in the computer industry, and they’ve done a lot to hold the line against Microsoft’s campaign for complete domination of the computer industry. They’re one of a very few companies that have actually had any real success in that area, and we all owe them a debt of gratitude for that, if nothing else.
Apple released the latest iPhone development license yesterday, and I suddenly find myself a lot less grateful.
Continue reading ‘Personal property and computing’ »
March 29, 2010, 11:16 pm
I’ve been playing around with Delphi ever since high school. I took a Pascal programming class and thought it was a really cool language. Shame you couldn’t do visual programming with it, though. (I was really into VB at the time.) Then a buddy of mine introduced me to version 1 of “this new Visual Pascal program” and it was love at first byte. But I didn’t get real serious about Delphi until about three years ago, when I decided to dust off an old pet project of mine from the D7 days, a tool I created for the purpose of making team collaboration easier for RPG Maker 2000 projects.
Continue reading ‘The joys of old code’ »
March 25, 2010, 8:35 pm
Most of my posts on here have been about technical subjects, geared towards moderate-to-advanced Delphi coders. This one’s to help out the beginners who are still learning the ropes. I’d like it to be something that people can send new users to from StackOverflow or other sites if they’re having trouble figuring out how to clean up their memory properly.
I’ve never really understood why people find memory management difficult. Maybe I just “get it” for some reason, but it’s never seemed all that arcane or complex to me. In all my time working with Delphi, I’ve only run into one truly difficult memory management scenario, and it’s something that most people won’t ever have to deal with: sharing global interface references across package boundaries. If you do that wrong, you’re likely to run into some very strange errors at program shutdown that are hard to debug.
But people keep asking questions about the basics of what to free and how to free it on StackOverflow, and from answering them and analyzing the questions and the answers, it seems to me that the entirety of memory management can be boiled down to one single principle.
Continue reading ‘Delphi memory management made simple’ »
March 23, 2010, 10:17 am
This morning on StackOverflow, someone asked a question about invoking constructors through extended RTTI. It happened that I’d had to work out a way to do that a couple weeks ago, and it took me about 5 minutes to find the code, strip out a few specific details and type up a solution. I got an accepted response, a few upvotes, and a very interesting comment from the author:
Continue reading ‘Closing the documentation gap’ »
March 15, 2010, 4:07 pm
Delphi 2010′s help describes TValue, used by the RTTI unit to store values of arbitrary types, as “a lightweight version of the Variant type.” I saw that and it made me wonder, how lightweight is it? How fast is using TValue?
Thankfully, among D2010′s lesser-known new features is the Diagnostics unit, which gives us TStopwatch, a simple record for timing operations. That makes it very easy to write a simple speed test.
Continue reading ‘TValue is very slow!’ »
March 9, 2010, 2:41 pm
I really loved when Delphi 2009 came out, how it fixed so many ugly problems in the Delphi IDE. The stability issues and memory leaks that plagued D2006 and D2007 were greatly reduced. And it just got better in D2010.
The tradeoff, though, seems to have been compiler stability. Trying to do anything with Generics in D2009 before Update 3 came out was a nightmare, and even after, (and even in D2010,) there were still plenty of dark corners where you can end up with an Internal Compiler Error or linker error on something that, syntactically speaking at least, is perfectly cromulent Object Pascal.
Continue reading ‘How to break the D2010 compiler’ »
February 14, 2010, 7:42 pm
A while back, Jim McKeeth told me (jokingly, of course) that with a TStringList and a TDataset, you can solve any programming problem. He also likes to compare TStringList to a Swiss Army Knife, because it can do so many things. And it sort of made me wonder. Continue reading ‘Random musing: TStringList’ »