I was doing some php research yesterday and stumbled on this online php book that had some very good information and examples that I could put to use right away. Check it out at http://www.tuxradar.com/practicalphp It's all online in html format, so there is no PDF etc. but it is easy to navigate with links to previous and next chapter as well as a "Jump to" drop down and a link to the table of contents.

The book has been updated for php 5.2 so it is kept fairly current, which is always a plus with online content!

So, if you are looking for good, free, text on php stuff, check this book out - it doesn't cost you anything:)

Arnor Baldvinsson

Currently there is no direct way to set a fixed filename for any of the output targets inside the Icetips Previewer, but you can easily do this on the report itself, rather than passing the name to the previewer and do it there. In fact this would probably be the preferred method since the report probably should determine the name and location of the resulting filename.

You need to put code into a single embed where you set the filename:

Embed Tree for setting target filename

All the code that you need is just a call to the SELF.SetFileName() method. Please note that each output target has it's own Setup method so if you have multiple output target templates active you will need to do this for all of them. You can pass the filename as a string, variable or an empty string if you want it to open the file dialog in the Previewer when you print to PDF.

Embed for setting target filename

In this case you can use:

SELF.SetFileName('')  

This triggers the FileDialog to open in Previewer when you click on the PDF button.

SELF.SetFileName('myfile.pdf')

This writes the PDF file as "myfile.pdf" to the current folder.

SELF.SetFileName('C:\temp\myfile.pdf')

This writes the PDF file to specific folder, which is probably not what you want to do!

SELF.SetFileName(LOC:PDFFileName)

In this case a variable is used. You can prime the variable anywhere before the PDFReporter.SetUp method is called, or you can do it right before the SELF.SetFileName. Note that the PDFREporter.Setup method is not actually called until the report is in the Previewer so if you use a Global, Threaded variable, you can set this in the Previewer. Since the previewer and the report will always be on the same thread, you can just set this variable to be threaded and then there are not threading issues to deal with.

Here is an example of how this can be implemented. On the report I have changed the code to:

SELF.SetFileName(Glo:PDFFileName)

The global variable is a CString(2049) global variable with the "THREAD" attribute. To do that simply check the "THREAD" checkbox on the "Attributes" tab when you create the global variable - doesn't make a difference if you do it in the Global Data or in the Dictionary.

In the Previewer, all that is needed now is to set the global variable. Normally I would think that you would want to set the filename on the report, but this gives you an idea how to do it on the Previewer also. I have added an instance of our ITShellClass from the Icetips Utilities to the previewer procedure - in the "Local Data" embed I added:

ITS  ITShellClass

Now in the "Local Objects | Icetips Previewer | Clarion 6 Save Buttons | Before Save Dialog"

Embed Tree for setting target filename

I have added this code:

  If GQ.GName = 'PDF'
    Glo:PDFFileName = ITS.GetSpecialFolder(IT_CSIDL_PERSONAL) &|
                      '\MyPDF.pdf'  
    !! Glo:PDFFileName must be be used in the report's 
    !! PDFREporter.Setup.

    If Not FileDialog('Select PDF to save',|
          Glo:PDFFileName,|
          '*.pdf|*.pdf',|
          FILE:SAVE+FILE:KEEPDIR+FILE:LONGNAME+FILE:ADDEXTENSION)
      Message('No PDF File selected, aborting PDF save',|
              'PDF Saving aborted',ICON:Hand)
      Exit
    End
  End

Note the "GQ.GName = 'PDF'". This allows you to just do the PDF if you want the default filename handling for other options. The GQ contains all the target names, such as "PDF", "HTML" etc. At the top of the routine that handles the targets in the Previewer, the correct item is selected from the GQ queue so throughout the routine you can use GQ.GName to determine what is the active target being printed to.

If you find new ways to use this, I would certainly appreciate if you would be kind enough to add a comment to this article so I and others can benefit:)

Arnor Baldvinsson

Roberto Artigas has sent us the latest version of his popular DCT2SQL templates and I have made them available for download on our download page.

According to Robert this new version is compatible with Clarion 7.1. He has fixed some minor issues caused by incorrect placement of #BOXED/#ENDBOXED pairs. And the templates are backward compatible with Clarion 6.3 so you can now use those popular templates on both IDEs:)

Arnor Baldvinsson

When running Clarion 7 on Vista or Windows 7, some people have run into an issue where they cannot open .hlp files from the IDE. This is not a problem with Clarion 7 as such, but that the templage language still only supports the .hlp file format and Vista, Windows Server 2008 and Windows 7 do not include the WinHlp32.exe program to open the .hlp files.

Fortunately Microsoft has made them available for download for the past two years or so. Go to http://support.microsoft.com/?kbid=917607 and download the appropriate program for:

Vista
Windows 7
Windows Server 2008
Windows Server 2008 R2

Note that vendors cannot re-distribute WinHlp32.exe with their products so Softvelocity has to rely on developers downloading and installing the program directly from Microsoft.

Also note that in order to install WinHlp32.exe you must be logged in as administrator.

Arnor Baldvinsson

I had the need to create an install with Setup Builder 7 that would be time limited so that it would not run after a certain date. Obviously this is no foolprof method since it can easily be bypassed by changing the date in the computer, but for what I wanted it was perfect!

Set Variable %IT_TODAY% to FUNCTION:Get System Info
  (Current Date) -- Format "12"
If %IT_TODAY% Greater Than "20100228" Then
   Display Message Box "This time limited Beta build 
     install expired on Fe..." -- 
     "Time limited Beta install has expired"
   Exit Installation(99)
Else
   Display Message Box "Note that this is a time limited 
    Beta build instal..." -- 
    "Time limited Beta install"
End

Note that the lines wrap and in the actual script this is only 7 lines, which start out bold in the box above.

The first line get's the current date from the computer where the install is running in a "YYYYMMDD" format. The IF statement compares the value with "20100228" - February 28, 2010, and if the current date is greater, then it displays an error message and exits the install. If it is equal or less, then it displays a warning message about this being a time limited install and continues.

Arnor Baldvinsson

If Clarion 7.1 crashes on startup with something like:

Clarion Version : 7.1.0.6545
..NET Version         : 2.0.50727.3603
OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 3
Current culture      : English (United States) (en-US)
Working Set Memory   : 38052kb
GC Heap Memory       : 1989kb

Unhandled exception terminated Clarion

Then the chances are pretty good that you do not have the Visual C++ Runtime Library update that is required. To fix this download and install this file from Microsoft: Visual C++ Runtime Library

This installs the VC2005 RTL and Clarion 7.1 will now load properly.

Arnor Baldvinsson

Clarion 7.1 final release has been out for about 3 weeks now and so far no issues have been reported with any of our products in 7.1!

Claron 7.1 is getting pretty close to being a very productive product while there are still a few problems here and there I think that next build will probably take care of a lot of the snags that I have had minor issues with.

In February I will start moving the Build Automator to Clarion 7.1 and will report on how that process goes.

Arnor Baldvinsson

We at Icetips send you all our best wishes for a Happy and prosperous New Year in 2010. Our office will be closed until January 4th but we will still check our email and take care of any support issues that may come up:)

We thank you for your business in the past and look forward to work with you all in the new year.

Happy New Year

Icetips

Merry ChristmasWe at Icetips Alta LLC wish you all Merry Christmas and a Happy and prosperous New Year in 2010! We appreciate your business and support in 2009. Our office will be closed until December 28 and then from December 31. to January 4. We will still be checking our emails, but repsonse might be a bit slow over those two holiday weekends.

Arnor Baldvinsson and Susan Pichotta

2

While exploring the Clarion 7 IDE I accidentally came across a neat way to change the font size in the editor. Hold the Control key down and scroll your mouse wheel! It will increase or decrease the font size in a nice smooth action. For old timers like myself this is a very nice way to be able to zoom in to a section of code that I need to take a really close look at!

This works in both the file editor and the embed editor in Clarion 7. You can also set the font size manually by going to "Tools | Options" and then select the "Text Editor" node in the tree on the left.

Arnor Baldvinsson