` Wrong code generated in version 2.400 (Arnor Baldvinsson) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Icetips Products: Wrong code generated in version 2.400
2006-12-05 -- Arnor Baldvinsson
 
Icetips Previewer version 2.400

In the Icetips Previewer, version 2.400 there was a nasty bug that crept into the generated code for the File|Print menu item and the two print buttons on the toolbar. The results were that when using the printer selection, the Event:CloseWindow would be posted before calling the routine to print, with unpredictable results.

In order to fix the code, please open the EVENT:Accepted event embed for the ?FilePrint menu item in the Previewer procedure. The correct code should look like this:

1. If you added the Printer Selection template when creating the procedure:

 Do ITPPrintToSelectedPrinter   ! Use this line with Printer Selection
 !ITP:Response = True           ! Use without Printer Selection
 !Post(EVENT:CloseWindow)       ! Use without Printer Selection
2. If you did NOT add the Printer Selection template:
 !Do ITPPrintToSelectedPrinter  ! Use this line with Printer Selection
 ITP:Response = True            ! Use without Printer Selection
 Post(EVENT:CloseWindow)        ! Use without Printer Selection
Next please open the EVENT:Accepted event embed for the ?PrintAllButton button in toolbar of the Previewer procedure. This code should be the same as above:

1. If you added the Printer Selection template when creating the procedure:

 Do ITPPrintToSelectedPrinter   ! Use this line with Printer Selection
 !ITP:Response = True           ! Use without Printer Selection
 !Post(EVENT:CloseWindow)       ! Use without Printer Selection
2. If you did NOT add the Printer Selection template:
 !Do ITPPrintToSelectedPrinter  ! Use this line with Printer Selection
 ITP:Response = True            ! Use without Printer Selection
 Post(EVENT:CloseWindow)        ! Use without Printer Selection
Finally please open the EVENT:Accepted event embed for the ?PrintOneButton button in toolbar of the Previewer procedure. The correct code should look like this:

1. If you added the Printer Selection template when creating the procedure:

 !Do PrintOne                   ! Use without Printer Selection
 Do ITPPrintCurrentPageToSelectedPrinter ! Use this line with Printer Selection
 !ITP:Response = True           ! Use without Printer Selection
 !Post(EVENT:CloseWindow)       ! Use without Printer Selection
2. If you did NOT add the Printer Selection template:
 Do PrintOne                    ! Use without Printer Selection
 !Do ITPPrintCurrentPageToSelectedPrinter ! Use this line with Printer Selection
 ITP:Response = True            ! Use without Printer Selection
 Post(EVENT:CloseWindow)        ! Use without Printer Selection

This should fix the generated code for those 3 controls. Since this bug affects end user results we would strongly urge you to check to make sure that these 3 controls work properly in your applications. This affects only previewer procedures generated with the updated wizard in version 2.400, released on November 1, 2006.



Today is April 28, 2024, 12:51 pm
This article has been viewed 35101 times.
Google search has resulted in one hit on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: