There will be a new build of the Icetips Utilities released on Tuesday, September 7.

Documentation is now complete for the File Search Class and the Date Class, and work was done in the Core Class, Date Class and File Search Class.

The main work in this build was on the Date Class. It has 28 new methods and the Date Class is now fully documented. This includes methods that are compatible with the DateDiff and DateAdd functions in Microsoft SQL. There are methods to get dates in the past and the future, such as GetLastWeek, GetNextWeek, GetLastMonth, GetNextMonth etc. For more information please see the online manual. Please note that the online manual is not 100% up to date right now but will be updated when the new release is uploaded on Tuesday. The new methods make it easy to do quick date calculations. Week calculations are ISO-8601 compatible and you can set any day of the week as the start date. If you see that some functionality is missing from the Date Class please let me know so I can continue to improve it. 🙂

There is also a new parameter for the FileExists method in the Core Class, which makes it possible to use it to check the existence of files or folders using the FF:_ equates as they are used for the Directory() function in Clarion. This makes it more versatile.

There are some very powerful methods in the File Search Class to scan for folders and files. I have made some minor improvement to the class, including adding a FreeFiles parameter to the ScanFiles method that allows you to call it multiple times and it will add the files to the Files queue rather than free the Files queue each time it is called. This increases flexibility of the method. I also fixed a problem with the ScanFiles method that I ran into when calling it with a fixed path and a wild card. In that situation it did not check if the path ended with a backslash which caused problems.

I am planning to get back on a schedule by releasing new product builds every other week or so. If you have ideas for new methods/classes, please don't hesitate to let me know!

Arnor Baldvinsson

I will be attending the Clarion Live DevCon 2010 in Denver at the end of October as a third party exhibitor. I am very much looking forward to see all the other Clarion developers attending and talk to you guys there!

Please come visit me at the conference if you have any questions, suggestions or comments!

Arnor Baldvinsson

We have made Clarion 7.2 compatible builds of all our products available for download from our website. You can now go ahead and download the new installs. All subscribers should have received an email from us with the download links. If you haven't please check your spam filter and if you still haven't received it check the email address in your Icetips account or drop me an email to let me know:)

You need to have a valid subscription to be able to download the installs. If you need to renew your subscription, please go to http://www.icetips.com/renewsubscriptions.php and purchase a renewal. If you do not have an Icetips Subscription, please go to http://www.icetips.com/subscribe.php to purchase.

Arnor Baldvinsson

Softvelocity released Clarion 7.2 yesterday (Friday, June 4, 2010). As I started testing with it this morning, I immediately ran into an old problem with the #RUNDLL template statement which I use in various places in our templates. This was fixed in 7.1 (or around 7.1 somewhere) but before that it would show a harmless GPF message in the output window but would not cause any issues. Well, that was not the case now as it would make the IDE become unresponsive and it had to be killed with the task manager. So this had to be fixed or worked around one way or the other!

After messing with this for a while and not getting anywhere with it, I decided to bite the bullet and reconstruct my old Borland C++ dll in Visual C++ as I have suspected that there are some incompatibility issues between Clarion 7 and the DLLs created by my old Borland C++ compiler. And lo and behold it fixed the problem! Now the new clean installs work perfectly!

I am currently rebuilding all the installs with the new dll and will finish that tonight and will resume testing in the morning. All new builds of our products will be available some time tomorrow!

Arnor Baldvinsson

The past couple of weeks have been on the difficult side for me as I had a bit of a cold and as sometimes happens to me I ended up with an eye infection for most of last week, which does not help with productivity in front of a computer screen! I got a good rest this last weekend and fortunately this nasty infection seems to be completely gone now!

On March 15, we released new builds of all of our products, mainly maintenance for Clarion 7.1 support. We also released a new build of our Runtime which is used by our templates. Unfortunately some of our installs that we released on the 15 had the wrong runtime DLLs, so I suggest that you download the latest build to make sure that you have the correct DLLs. Nothing serious is going to happen if you have the wrong ones and they will be replaced with new builds soon. Note that those runtimes are only used in the templates in the Clarion IDE and have nothing at all to do with what you need to distribute with your applications.

I have been working on further documenting the Utilities and there will be a release early next week with more updates. Currently I'm working on the Controls Class and the File Search Class. I have also been working on research and alpha testing on a new Utilities product, but it has been slower than I had hoped so I'm not planning on a beta release until around the middle of April.

Arnor Baldvinsson

Today we have discovered a problem in the latest Clarion 7.1 build 6849. This problem affects most of our products and will cause a GPF in the program at runtime. What I found out was that the #PDEFINE template statement, which we have used for years to add defines to the project, doesn't fire in this Clarion 7.1 build so classes that depend on their own defines in the MODULE and DLL attributes are not compiled correctly and will cause a GPF when the classes are instantiated.

I have reported this to SoftVelocity's Problem Tracker and I really hope that this will be fixed in the next build.

If you converted projects from Clarion 6 to 7.1 with our products in them, you should be just fine. This only affects templates that you have added to applications in this latest build of 7.1 and possible some of the latest builds as I'm not 100% certain when this stopped working.

I am also looking into an obscure problem in the SQL browse template that only shows up in 7.1, when the GreenBar is being used and only when a new column has been added. After then app has been closed and re-opened the problem goes away and also if the actions for the SQL browse have been entered after a new column has been added. It could be something in our templates or it could be something that is related to the #PDEFINE issue if some statements are not executing correctly.

Arnor Baldvinsson

We released two new builds today with minor updates to Outlookbar, build 2.0.122, and SQL Browse build 6.2.470.

We have added support for runtime translation to Outlookbar and also made a minor update to the documentation to clear up confusion about the mimic button option. The install was also updated to make sure it detects Clarion 7.1 installs correctly.

The SQL Browse had an issue with template code that, while it had worked for the past 10 years or so, was just plain wrong and could fail miserably in Clarion 7. It did not appear to affect existing procedures, but new procedures would have a problem and show an error message at runtime and completely lose connection to what columns should be displaying in the browse. As with Outlookbar, we updated the install to detect Clarion 7.1 correctly.

I had planned to get the Thread Limiter out into beta testing today but I had to take some time off last week to prepare for the webinar last Friday so it will not be out into beta until later this week.

You can now download the webinar download the webinar from Clarion Live and watch it. I went through how the Window Fixer works and also just scratched the surface of the Icetips Utilities.

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