Archives for: April 2009

Arnor Baldvinsson
04/21/09

Icetips Utilities tutorials

I have started posting what I call "Mini-Tutorials" about the Icetips Utilities. The first one is up and is about the String class.

There is a lot of powerful stuff in the Icetips Utilities and we are far enough ahead into this product now that we can start showing people really how they can be used. The tutorials are not about how the classes work, but how you can use them. They demonstrate with simple code how to accomplish certain tasks, in this case for example how to quickly read and write text files without using the Clarion ASCII driver. Also how to export data to comma separated files and even XML.

We will be posting one tutorial every Monday so make sure that you check them out!

-- Arnor Baldvinsson

Arnor Baldvinsson
04/21/09

Icetips Utilities build 2352 available

We have made build 2352 available for download. This build includes mostly updates to the documentation - several more templates have been documented - and it also includes minor fixes to the ReadFileToString and WriteStringToFile methods that would report errors on the wrong api in some circumstances.

We are trying to get into a schedul or releasing something new every Monday but we hit an unexpected problem yesterday so we delayed the release until this morning!

-- Arnor Baldvinsson

Two months ago I implemented the Clarion PDF generation templates in a client project. I was pretty horrified by the results as characters were chopped and spaced very strangely. After posting about this on the Clarion newsgroups, Lee White suggested that this was because I was running Large Fonts on my system.

Since I have had to deal with Large Font issues before simply because I use high resolution and need to be able to seeB) I decided to take a closer look at this and see what was going on.

Sure enough the problem stems from code in the ABPRPDF.CLW file where the width of the characters is calculated. To fix this I made some changes to the files.

This involves adding a single method to the PDFGeneratorClass class in ABPRPDF.INC and ABPRPDF.CLW:

Add to class declaration in ABPRPDF.INC (I put it in at the top of the
method list, around line 195):

AdjustDPIValues   PROCEDURE(Long pValue),Long 
!! AB 2009-02-19  Adjusts DPI values


In the classfile, ABPRPDF.clw, I added this:

PDFGeneratorClass.AdjustDPIValues   PROCEDURE(Long pValue)!!,Long 
!! AB 2009-02-19  Adjusts DPI values
HDcScreen  UNSIGNED
IDPI       Long
R          Real
L          Long
 Code
 R = 1
 HDcScreen = GetDC(0)
 If HDcScreen <> 0
   IDPI = GetDeviceCaps(HDcScreen, 88)
   L = ReleaseDC(0, HDcScreen)
   R = IDPI/96
 End
 Return (pValue / R)


In PDFGeneratorClass.AddFontDescriptor method, you have code like this:

!SET the fonts Width
LOOP LOC:I=SELF.FontsNames.FirstChar TO SELF.FontsNames.LastChar
   LOC:CharToTest=CHR(LOC:I)
   IF GetTextExtentPoint32(LOC:DC,LOC:CharToTest, 1,LOC:CharSize)<>0 THEN
      IF LOC:Subclasing THEN
         IF SELF.FontsNames.CharWidth[LOC:I] THEN
            SELF.FontsNames.CharWidth[LOC:I] = LOC:CharSize.eW
         END
      ELSE
         SELF.FontsNames.CharWidth[LOC:I] = LOC:CharSize.eW
      END
   END
END


I changed both of the assignments to the CharWidth to:

SELF.FontsNames.CharWidth[LOC:I] = |
           SELF.AdjustDPIValues(LOC:CharSize.eW)

In PDFGeneratorClass.GetTextWidth method, you have code like this:

 IF SelectObject(LOC:DC, LOC:HFont) THEN
    RV = GetTextExtentPoint32(LOC:DC,pText, LEN(pText),LOC:CharSize)
    LOC:OLDMAPMODE=SetMapMode(LOC:DC,LOC:OLDMAPMODE)
    DeleteObject(LOC:HFont)
    RETURN LOC:CharSize.eW + (LOC:CharSize.eW/20)
 END


I changed the RETURN to adjust the value:

RETURN SELF.AdjustDPIValues(LOC:CharSize.eW + (LOC:CharSize.eW/20))

This takes care of the font sizing problem in any DPI combination that I
threw at it:)

Arnor Baldvinsson

Arnor Baldvinsson
04/16/09

Online manuals updated

I have updated the online manuals for the products that have those. That includes Outlookbar, PowerToolbar, Previewer, Utilities, XP-Taskpanel and XP-Theme.

The documentation for some of the older tools is still in Word/PDF format only and will not be updated until I get those into Help and Manual.

Arnor Baldvinsson

Arnor Baldvinsson
04/15/09

Clarion 7 compatible installs

We have made Clarion 7 compatible installs available for ALL of our products! Those who have a valid subscription can log in and download the latest installs. The installs have been tested with the last 2-3 builds of Clarion 7 and anything we have found has been fixed if we could. There is a couple of items that we found to be bugs in Clarion and we are certain that those will be fixed by Softvelocity as soon as possible.

One problem we ran into was with our Checkbox Fixer. It fixes checkboxes and radio buttons on reports so they look better and are more easily readable. We create controls at runtime and rely on getting the font information from the controls on the report. In Clarion 6.3 and older this worked flawlessly. In Clarion 7 the font size for Radio buttons is not related to the actual font size - not sure what it is related to. On our test machines here we would get a value of 25 points while Softvelocity confirmed that they were getting values around 64 points!

Another issue with Clarion 7 is that we cannot use the Menu theming in PowerToolbar in Clarion 7 so it has been disabled. Clarion 7 uses owner drawn menus and there is no way to make the PowerOffice menus work with them unless SV makes it possible to turn the Clarion 7 menus into standard windows menus like they are in Clarion 6.

If you find any problems with the new installs, either for Clarion 7 or older then please let us know as soon as possible so we can fix them right away and release new builds.

We have done a lot to make the look and feel of all our products and all our installs as similar as possible. All our templates now have a "Support" tab where you can go directly to our website, our bug tracker and open a support web page that is installed on your computer. From that page you can log into your account, open the online chat software, etc. etc.

We now use our Build Automator to build all our installs. That means that everything should have exactly the same version numbers, including template source, class source, install, everything. So you can see immediately by looking at the first lines of a source file what version it is if you need to report problems. All the templates also show the version number on the Support tab and the release date. We hope this will help tracking down issues.

One other thing that we are changing and that is that we will be making new installs available for download without overwriting or removing the old installs. We will however not make installs that are older than todays installs available so this is more for future use. This allows you to download older installs if you need to for example if you are working on client projects that use older versions and you don't want to update.

There has been a lot of discussion about placement of demo apps for Clarion 7. All our installs now allow you to select a folder to place the demo apps in for both Clarion 7 and older versions. By default the suggested path is %ROOT%\3rdParty\Examples\ProductName in Clarion 6 and older and CSILD_COMMON_DOCUMENTS\SoftVelocity\Clarion7\Accessory\Icetips\ProductName in Clarion 7. If you install for Clarion 7 a shortcut is created to the demo apps folder during the install.

Arnor Baldvinsson

1 2 >>