Wednesday, March 07, 2007

Where is puterSoft.com?

Don't you hate it when a software component vendor disappears without warning?  In some of our applications, we use a custom datetime edit control named TPSCDateEdit.  This is part of a package from a company named puterSoft.  We have been using it for about 5 years and when we migrated our Delphi code to Delphi 2006, we got the Delphi 2006 version of their code.

Well, we discovered an annoying cosmetic bug.  If you exit a TPSCDateEdit control without entering in a date, the text of the control gets the date '12/30/1899'.  12/30/1899 is the day that the world began if you are a COM based life form.  The control was saving the right data (or in this case the lack of data), it was just the display that looked ugly.

So the first thought was to check puterSoft's web site to see if this was a known issue and had a fix or work around.  That failed and when I tied to ping the domain name, that failed.  I did some playing around on http://www.dnsstuff.com/ and I learned that it was hosted at DiscountASP.net and that DNS lookups are failing.  If you perform a DNS lookup for puterSoft, it goes into a loop and DNSstuff is smart enough to break out of that loop. 

I can't tell if puterSoft is gone or something is all fracked up with DiscountAsp.net's DNS records.  I've emailed Sergiy at puterSoft to see if they are still around.  I also fired off an email to DiscountAsp to see if they can tell me anything.  After 20 minutes, I got a reply back from DiscountASP.NET that the account has been cancelled.  That's Not Goodtm.

Since I'm not going to get any resolution from puterSoft in the immediate future, I decided to take a whack at it and see if it was a simple fix.  And it looks like it is.

When you exit a TPSCDateEdit, the following methods are called:

  • TPSCCustomDateEdit.PostValue
  • TPSCCustomDateEdit.SetDateTime
  • TPSCCustomDateEdit.UpdatePopup
  • TPSCCustomDateEdit.GetAsText

Other methods are called, these are the ones important here.  UpdatePopup has the following logic:

 

If Text <> GetAsText Then
  Text :
= GetAsText;

 

The code in GetAsText looks like this:

 

function TPSCCustomDateEdit.GetAsText:String;
begin
  Result:=DateTimeFormat.ToString(DateTime,Kind)
end
;

By changing that code to this:

function TPSCCustomDateEdit.GetAsText:String;
begin
  if DateTime <> 0 then
    Result:=DateTimeFormat.ToString(DateTime,Kind)
  else
    result := '';
end;

 

I get result that I want. And life is good again.

3 comments:

  1. Are you still using PuterSoft?
    Haven't you migrate to D2009-10?

    ReplyDelete
  2. We are currently on Delphi 2007. We are still using the puterSoft control, but we have deprecated it's use. As far as I can tell puterSoft is defunct, but there is a Yahoo! Groups for support. That group is not run by anyone affiliated with puterSoft, but it's the only game in town.

    ReplyDelete
  3. Hi,
    i migrated putersoft sdk V.2.03 to D2010 and tested a lot of it but not all the components.
    Now im using it on old project ported from D5/D6 to D2010.
    If someone need it pls contact me perhaps my job can be usefull.

    ReplyDelete

Note: Only a member of this blog may post a comment.