Lescasse Consulting
 Home    Company    News    Prices    Download    Buy    Forums   
Read Me
Buy
Forums
Resume
AntiSpam 1.2
wBackup 1.11
NetAccess 2.0
Visual APL 1.0 
APL+Win 8.0 
APL+Win Products 
APL+Win Objects™ 
APL+Win Training 
     • Packages
     • Feedback
     • World Map
     • Updates
     • Pack 1
     • Pack 2
     • Pack 3
     • Pack 4
     • Pack 5
     • Pack 6
     • Pack 7
     • Pack 8
     • Pack 9
     • Pack 10
     • Pack 11
     • Pack 12
     • Pack 13
     • Pack 14
APL+Web Services
APL+Web Component 
APL+ History
Dyalog.Net Tutorial
Conferences 
Powerpoint
White Papers
Web Hosting
References
Links
 
APL+Win Objects™ 6.0

TADO5
TADO5 Tutorial
TAPLDraw5
TAPLEdit5
TAPLSession5
TAbale5
TAboutBox5
TAccess5
TAgent5
TBlatMail5
TButton5
TCDO5
TCRC5
TCancelButton5
TCheck5
TCheckGroup5
TChildForm5
TChooseColor5
TChooseFont5
TClipBoard5
TClock5
TCodeStats5
TColors5
TCombo5
TComboDrive5
TComboFilter5
TComboList5
TComboTree5
TCommandBar5
TCommandButton5
TControlClass5
TCueCard5
TDHTML5
TDHTMLEditor5
TDateTime5
TDateTimeFr5
TDates5
TDemoHandlers5
TDisplay5
TDOS5
TDualSelect5
TEdit5
TEditAmount5
TEditDir5
TEditEnter5
TEditFile5
TEditGrid5
TEditList5
TEditListview5
TEditMenu5
TEditNum5
TEditSelect5
TEditSpin5
TEmail5
TError5
TExampleForm5
TExcel5
TExcel5 Tutorial
TFindReplace5
TFOne5
TFTP5
TFTP5 Tutorial
TFileCompare5
TFileMenu5
TFileMenuDef5
TFlatButton5
TForm5
TFormClass5
TFormEditor5
TFrame5
TGetDir5
TGif5
TGifForm5
TGifWb5
TGoMenu5
TGraphX5
TGrid5
TGridDisplay5
TGridPrint5
TGUID5
THLine5
THTML5
THTML5 Tutorial
THTTP5
THelp5
THelpMenu5
TImagelist5
TInfo5
TIniFile5
TInstall5
TInternet5
TJpg5
TJpgWb5
TLabel5
TList5
TListview5
TLock5
TLogs5
TMAPI5
TMath5
TMDIForm5
TMSOutlook5
TMaskEdit5
TMedia5
TMenu5
TMessage5
TModalCall5
TMsgBox5
TNavigator5
TNetwork5
TNonVisualClass5
TODBC5
TOKButton5
TObject5
TOpenFile5
TOption5
TOptionGroup5
TOutlook5
TOutlookMail5
TOWCSpread5
TPDF5
TPFKeys5
TPage5
TPassword5
TPicture5
TPing5
TPopupMenu5
TPowerpoint5
TPowerpoint5 Tutorial
TPrinter5
TProgress5
TProgressDlg5
TQuestion5
TRegistry5
TRegistryKey5
TResource5
TRichEdit5
TSPX5
TSQLDMO5
TScheduler5
TScroll5
TSelector5
TSpinner5
TSplitter5
TStatus5
TStopWatch5
TTest5
TTestError5
TTextFile5
TTimer5
TTip5
TTipForm5
TTLI5
TToolBar5
TToolbox5
TToolsMenu5
TTrackbar5
TTranslate5
TTree5
TVLine5
TViewMenu5
TWebBrowser5
TWebServer5
TWebSite5
TWebSiteNet5
TWinMenu5
TWord5
TYesNo5
    Visits:  1882 (10 on line) Last Update: Nov 23, 2003  
    APL+Win Training Pack 5    Printer Friendly  
Error Handling in APL+Win
A Functions Lister
A General Multi-Purpose Printing Function

Download APL+Win Training Pack 5 (1237 K)
Download APL+Win Training Pack 5 Update (91 K)

The APL+Win Training SETUP5.ZIP file includes: The Tip of the Month

The Tip of the Month is a new feature of the APL+Win Training Program. In each APL+Win Training Pack you will get a one or 2 pages APL+Win tip.

This time, you will learn how to launch your Internet browser and/or reach any Internet URL address directly from inside an APL+Win application.

Error Handling in APL+Win Applications

In this Training Pack you will learn how you can secure your APL+Win applications by adding nice error handling to them with minimum efforts.

With these error handling techniques, whenever an error occurs, the following form is displayed:

  • The Stop and Info buttons may be hidden with a .INI file parameter.

  • Clicking OK cleanly returns to the calling form.

  • Clicking Stop displays the error in the APL session as if there had not been any error handling.

  • Clicking Info displays more information about the error, as follows:

Errors are automatically saved in an ERRORS.SF file for later analysis. The above form allows navigation through the ERRORS.SF file in order to recall about past errors.

The error workspaces delivered with this Training Pack contain a small set of reusable utilities (4 utilities in ERRORMIN.W3 and 7 utilities in ERRORMAX.W3) which you can add to your APL+Win applications to install error handling into them.

Adding error handling is as simple as adding 3 small lines of code to your main application function and one label to each form function!

Printing your workspace functions You will also learn how to nicely print one or more or all of your workspace functions.

You will learn how to write a stand-alone unique APL function to document your workspaces.

The function is called printfns and you will therefore be able to use it from any workspace, at any time, as long as you have installed the OBJECTS software described in our January 97 documents.

Example:


      )xload 51 windows
51 WINDOWS SAVED 07/14/1996 01:19:49
	
      $printfns 'Wforms Wtrace Wtree Wsize'

will result in the following listing:

where the top of first page, when zoomed looks like this:


The printfns WorkSpace DOCumentor offers the following features:

  • displays one, several of all functions from your workspace
  • displays headers and footers on each page
  • uses different fonts for headers/footers and for APL code
  • displays workspace name, time and date
  • displays Copyright, page number and calling function name
  • displays separation lines ending with function names for:
    • better readibility
    • easy thumbing through long listings to find a function
  • skip to next page if function does not fit on current page
  • lets you choose Portrait or Landscape printing
Solve most of your APL+Win printing problems

One of the most difficult things, albeit a basic need for almost every one, is printing under Windows.

In this Training Pack you will learn how to build and use a general Object Oriented printing utility which will help you produce Excel-quality reports with very little efforts. This utility called GuiPrint should solve most of your APL+Win printing problems.

For example, here is a report produced in Landscape mode from APL+Win with the GuiPrint utility:


The previous report is produced by the following simple APL function:


    ’ test26;pos;S
[1]   ©’ test26 -- Sample report n° 26
[2]   ©’ Copyright (c) 1997 Eric Lescasse [23feb97]
[3]
[4]       GuiPrint'Invisible'
[5]       GuiPrint'DefaultFont' 'Arial' 14
[6]   pos„GuiPrint'Add' (2 2) Data5
[7]       GuiPrint'Border' 'thin' 'medium'
[8]       GuiPrint'ColWidth' (1‡¼9) (1 6 1/5400 3800 4000)
[9]       GuiPrint('SelRef' 'B2:B4;I2:I3')('Border' 'no' 'no')
[10]      GuiPrint('SelRef' 'B5:B10;C2:H4;I4')('BackColor' 0 0 192)
[11]      GuiPrint('Font' 'Arial' 16)('Bold' 1)
[12]      GuiPrint('Sel' 2 3 2 8)('Align' 'across' 'nochange')
[13]      GuiPrint('Font' 'Arial Black' 18)('Italic' 1)('Bold' 1)
[14]      GuiPrint('Sel' 3 3 3 5)('Align' 'across' 'nochange')
[15]      GuiPrint('Font' 'Arial Black' 14)('Italic' 1)
[16]      GuiPrint('Sel' 3 6 3 8)('Align' 'across' 'nochange')
[17]      GuiPrint('Font' 'Arial Black' 14)('Italic' 1)
[18]      GuiPrint('Sel' 4 2 4 9)('Align' 'right' 'nochange')
[19]      GuiPrint'Sel' 5 3 10 9
[20]      GuiPrint'Format' 
[21]      GuiPrint'HLine' 'medium' (2) (3 8)
[22]      GuiPrint'HLine' 'medium' (4 9) (2 9)
[23]      GuiPrint'HLine' 'medium' (3) (3 9)
[24]      GuiPrint'VLine' 'medium' (2 10) (1 4 7)
[25]      GuiPrint('Margins' .9 1.1 2 1)('HCenter' 1)
[26]      S„›'\Uniware\APL Department'
[27]      S„S,›'\APL Sales\(First Semester 1996)'
[28]      S„S,›'\&D\&T'
[29]      GuiPrint'Header' (0 1 0 ssHeader S)
[30]      S„›'\Copyright © 1997 Eric Lescasse'
[31]      S„S,›,'\'
[32]      S„S,›'\Page &P/&N'
[33]      GuiPrint'Footer' (0 0 0 ssHeader S)
[34]      GuiPrint'Print' 0 
’

This function is an example of how to use GuiPrint to directly submit a report with complex formatting to the printer. When you run test26, the only form displayed is one which shows the print job progress on your printer:

 

In the previous test26 function just change line 4 to [4] GuiPrint'Visible' and line 34 to [34] GuiPrint'Display' and you will have a chance to preview your report before printing, which is a great help when debugging reports:

In Chapter 11 you will learn how the general purpose GuiPrint function has been developed, using Formula One VBX to format data before printing and to print reports. Understanding how things work, you will be able to easily customize GuiPrint to fit your own needs by adding new methods to it.

With GuiPrint you will be able to:

  • program almost any report, as complex as it can be, in minutes,
  • perfectly align your column reports using proportional fonts
  • center headings above groups of columns
  • define column widths or let GuiPrint auto-determine the minimum column widths
  • use various fonts of any kind and any font attributes desired (bold, italic, underline, strikeout,...)
  • use various kinds of cell borders
  • use frames with various border types
  • draw horizontal and vertical lines or partial lines
  • perform complex numbers and dates formatting
  • automatically blank zeroes
  • use any font color and background color for any range of cells
  • define single or multi-line page headers and footers
  • use any kind of font and font size in your headers and footers
  • get automatic date, time, page number, total report pages on headers and/or footers
  • define print margins
  • horizontally and/or vertically center reports in the page
  • force page breaks anywhere desired
  • force reports to fit in the page (horizontally and/or vertically)
  • print in portrait or landscape mode
  • submit reports to printer directly with no form displayed
  • preview reports before printing
  • etc.

May we remind them to save all the utilities in their UCMDOBJ objects database.

 This entire Web site has been dynamically generated by APL+Win Objects™ 6.0
 For all questions contact:  info@lescasse.com
 Copyright © 2003-2005 Lescasse Consulting. All rights reserved.