Archive for July, 2008

Epson TM-U220

This printer gives me quite a problem  when installing it at the first time, namely the serial one. Simply just clicking the driver installer will not do the trick; making it work the way I want it is another task on hand.

Here’s what I probably have to note after successfully installing it:

  1. For the serial version, the default Transmission Speed is 9600 bps. Somehow the installer set a default 38kbps at the printer port settings.
  2. To make sure your printer has the correct default settings, open the case underneath the printer, and unscrew it. Check the DIP Switch settings.
  3. Locate your manual book and see what the switches means.

Normally, in case you forgot your manual, the default settings are:

  1. Buffer Capacity 40KB
  2. Handshaking DTR/DSR
  3. Word Length 8 bits
  4. Parity Check None
  5. Parity Select Odd
  6. Transmission Speed 9600bps

Make sure the port settings on the printer sheet completely match these default settings, or else nothing would work, or if you’re lucky, some garbage stuffs might come out.

Hopefully not a spam :D

Making a Splash Screen

I’m using splash screen for quite a while. But to realize I’m doing it in a very wrong way is another.

I usually used my Splash Screen as the main form (Since it’s the first one to show up). The problem is I can’t CLOSE it (by doing that will also close the application), and I looked like a totally script kiddies when my code is published. Only God knows what kind of mayhem I produced by using such technique.

Here’s how to make a better (and professional) splash screen :D

Dynamic Object Creation

It’s been days since I’m working on a bug which always generates Access Violation errors.

By slicing and analyzing the pattern, this error always occurs when I’m trying to Free and NIL an object. I’m pretty much confident for the array index, so it should not be the reason for this error.

procedure FreeButtons(Buttons: TButtons);
var
  Cnt : integer;
begin
  for Cnt := Low(Buttons) to High(Buttons) do begin
    FreeAndNil(Buttons[Cnt]);
  end;
  SetLength(Buttons, 0);
end;

This error appears after I ported my old SDI framework into an MDI one. It works perfectly fine earlier, but now definitely gives me some headache. I vaguely presume the reason behind this is the component ownership, but I still hasn’t convinced yet.

Then I stumbled on an article at http://delphi.about.com/od/kbcurt/a/dynamiccreation.htm about dynamic object creation. This article point out that if we’re going to free an object later, we should assign NIL as its parent.

Read more »

ClixieTrax Published

It’s still unclear why I started this blog. Or should I say my programming journal for my activities. Seriously, I had some problems with my thinning hair and fattening belly, but remembering things is quite a hard task these days. This journal is an effort of countering that.

Yes, I think I’m getting senile.

I was planning on creating a Media Wiki like my friend’s website, rickyok.net, but rather than making a copycat, I’m making a different style.

So here’s my first entry.