Mar 032005
 

At the moment (well not THIS moment), I am creating an image grabbing (as in: downloading) application/tool. Just for the fun of it. There are a lot of imagegrabbers out there. Mine is simple (for now). It expects you to input an URL of an image (the first one would be nice) of an image gallery, that has images like picture001.jpg, picture002.jpg, etc. Together with this URL you need to specify how many images are there. It will increase from 001 to 002 to 003 etc until it fetched the number of images you specified (it handles gaps (non-existant images) properly).

For internet-communication, I use the Indy components.

To have an “AfterPaste” event, I created a descendant of TEdit (I call it TRaReEdit). It fires the AfterPaste (still OnPaste, but I have to rename that) event when you paste something in the URL-field, either by using the keyboard (CTRL-V) or the mouse (Right-click & Paste). I needed this event to split up the URL into pieces, whereas I assume(d) that when typing (instead of pasting) a user would not mind tabbing between fields.

Images can be saved in a directory the user specifies.

For now, you have to wait until the first batch of images is done, before you can have another go. This will change when I move the downloading part to a seperate thread. Yep, multithreading, with some sort of queueing mechanism filling the thread.

Already in place is a thumbnail of the last downloaded image. This will change when the downloads are actually “remembered” (enter: database backend), because clicking a thumbnail will bring up the actual image (if still accessible). When the image is not on disk anymore, an dialog will ask if you want to download the image again.

Anyone coming up with a neat name for this will have his/her name stated in the credits.

I won’t post a screenshot, since most imagegrabbers know: it is nsfw!

 Posted by at 00:54
Feb 242005
 

To have an OnPaste property in a TEdit component, I wrote a little unit/package to create a descendant of TEdit. At the moment it only has OnPaste as an extra property (event), but I will extent it with OnCopy, OnCut, since they might come in handy in the future.

 Posted by at 00:19
Feb 222005
 

I’m creating an image-grabbing application, just for the fun of it. I ran into a problem on how to detect text was pasted instead of typed into a field (TEdit). Of course I tried the onChange, and when using that event things go fine when Pasting text (it’s fired right after the Paste action). But when typing into the same field, the event fires after every keystroke. Any hints?

Oh, it’s Delphi 6, so Win32 solutions please.

 Posted by at 00:55
Feb 032005
 

Allen blogs about the Visual Studio versus Delphi debate. Quite an interesting piece of Borland propaganda, if you ask me. As I see it: Delphi is not Delphi anymore, it’s just Visual Studio with a Delphi (read: able to compile Object Pascal) core. What is left out of the equation is (and I have ranted about this before) the price. If you’re a one-man band (like I am) you will choose VS.NET because it’s cheaper, has more support for it’s price and it’s easier to get new (preview, early access, beta) material. If you’re a big company and you need a license for say 20 developers, it sure is a difference to shell out 20 times €3500 for Delphi (total 70,000 plus quite some more for support), or 5 times MSDN Universal (no need for every developer to have everything) and 15 times VS.NET Enterprise Architect (total of 5×2800 + 15×2500 = $51,500 ~ €40,000).

What I miss in VS.NET? Live data at design time. That’s it. And Borland only has live data with their own dataproviders, and we all know that Borlands drivers are not known for their speed. Remember BDE?

Mind you, I have Borland Delphi 6 Enterprise, but I still don’t see why I need to shell out so much money for the upgrade to Delphi2005, when more and more (potential) clients are asking for C# programmers and I can have basically the same IDE (VS.NET) as FULL product for less than the Borland upgrade. How’s that for keeping your customers?

 Posted by at 15:56
Jan 192005
 

Delphigamer is hosting a contest. A game-development contest. Write a game with the theme “dogfight” in Pascal (Delphi, Kylix or Freepascal) and enter the competition with it. The rules can be found here. First prize is Delphi2005 Architect edition, donated by Borland. That’s US$3000!

There is a forum about the contest on PGD (Pascal Game Development).

 Posted by at 23:17
Dec 162004
 

In a follow-up to Perry’s post (again) I wonder: why should one buy Delphi 2005 instead of Visual Studio for .NET? A manager sees:

Delphi 2005 Architect edition: $3000 (new user). Support is an optional product. Cheapest level includes only 3 incidents for 12 months (whatever comes first).

MSDN Universal: $2800 (new user) and that gives the user VS.NET Enterprise Architect, ALL Office applications (including previous versions for testing), LTU (albeit for development only) for all Windows OS-es, including pre-releases only available to subscribers, online support with a garantueed response of 2 days, 4 phone incidents)

If you or your company has a history with Delphi and you want to keep your existing codebase, I can see why Delphi 2005 is a logical step. If you’re choosing tools for a new project, I cannot see why one would not choose MSDN Universal.

 Posted by at 10:51
Dec 162004
 

Yesterday I fooled around with the ODP.NET drivers from Oracle. Just to create a simple thing to proof the drivers worked, I dropped a OracleConnection and two buttons on a form, named one Connect and the other (guess what) Disconnect. I double-clicked on the Connect button, added a try-open-except-errormessage. At that time I didn’t notice the red underlining the .close statement had. I double-clicked on the Disconnect button and added a try-close-except-errormessage. F9. Delphi gave me an error on the open-property (duh, it’s not a property, it’s a procedure) of the Oracle-connection. I placed the cursor on the dot, removed the word “open” and the semicolon, and pressed Ctrl-Space. Hey, I thought, let Delphi do the work. I choose “procedure Close”, and pressed enter. Again, red underlining and still compiling did not work. WTF!?

Close all, save? No!

New C# project. Add Oracle-connection, and two buttons. No rename, just double-click. F*CK! (Excuse my French) C# needs () after a procedure with no arguments. F9. It works. I can connect and disconnect to my Oracle database.

WTF!?!?!?! Is Borland pushing us to use its C# to outphase Delphi???? 🙁

 Posted by at 08:42
Dec 152004
 

After reading Perry’s post about NexusDB V2 public beta, I surfed over to the NexusDB site, to find that their embedded (v1.08) database is now free. You don’t get the source (optionally available for US$250), but other than that it’s there for you to use. They even updated it to be used with Delphi 2005. That’s great!

 Posted by at 14:07
Dec 142004
 

If you’re using Delphi 2005 (Diamondback, Delphi 9) to create an ASP.NET application and run it with IIS, you might want to debug it. But you can’t, since Delphi can’t connect (so it says) to the ASP.NET-workerprocess. This might be your lucky day: check out this post.

 Posted by at 14:24
Nov 282004
 

Reading blogs on the Borland site, I stumbled upon a link to Inno Setup. The guy said “Inno Setup rocks!”, so I followed the link. Although I haven’t tried it yet, the feature list is impressive:

  • Support for all 32-bit Windows versions in use today — Windows 95, 98, 2000, 2003, XP, Me, NT 4.0. (No service packs are required.)
  • Supports creation of a single EXE to install your program for easy online distribution. Disk spanning is also supported.
  • Standard Windows 2000/XP-style wizard interface.
  • Customizable setup types, e.g. Full, Minimal, Custom.
  • Complete uninstall capabilities.
  • Includes integrated support for “deflate”, bzip2, and 7-Zip LZMA file compression. The installer has the ability to compare file version info, replace in-use files, use shared file counting, register DLL/OCX’s and type libraries, and install fonts.
  • Creation of shortcuts anywhere, including in the Start Menu and on the desktop.
  • Creation of registry and .INI entries.
  • Integrated Pascal scripting engine.
  • Support for multilingual installs.
  • Silent install and uninstall.
  • Full source code is available (Borland Delphi 2.0-5.0).

Especially when I add the line “Inno Setup is free!”.

 Posted by at 00:08