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 
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:  2985 (57 on line) Last Update: Dec 5, 2003  
    THTML5    Printer Friendly  
 
Description   Inheritance   Example   Properties   Methods
 
 Description

The THTML5 Object is a object used to create HTML pages from APL+Win It contains methods for converting APL nested arrays to HTML tables, adding images, adding APL Code, using styles, convert Excel spreadsheet to HTML, etc.

Description   Inheritance   Example   Properties   Methods
 
 Inheritance

Inherits from:  TObject5

Description   Inheritance   Example   Properties   Methods
 
 Example
 
 

The above example was generated by the following APL+Win Objects™ code:


      'html'Świ'*Create' 'THTML5'('debug'1)
      'html'Świ'Start' 'My Web Page'
      'html'Świ'AddStyle' 'BODY {background: url(//Dell8200/C/APLWin/Objects/apl2000a.gif) no-repeat center center}'
      'html'Świ'AddStyle' 'P {color: red; font-family: Helvetica, Arial, sans-serif; font-size: 9pt; margin: 50px, 100px, 50px, 100px;}'
      'html'Świ'AddStyle' 'H1 {background-color: cyan; color: purple; text-align: center; font-size: 20pt;}'
      'html'Świ'AddStyle' 'H1.warning {color: red; font-size: 16pt; border-top: ridge 2px blue; border-bottom: ridge 2px blue;}'
      'html'Świ'AddStyle' '.small {color: gray; font-family: Arial; font-size: 8pt; font-weight: 100;}'
      'html'Świ'Add' 'H1' 'My Web Page'
      'html'Świ'Add' 'H1.warning' 'This is a warning!'
      'html'Świ'Add' 'P' (500˝'This is some text in the page ')(300˝ 'In several paragraphs ')
      'html'Świ'Add' 'H2.small' 'This is an H2.small title'
      'html'Świ'Add' 'H2' 'This is an H2 title'
      aaa„10 10˝Ľ100000
      bbb„5 5˝1000׼100
      bbb[2;3]„›3 3˝'APL*PLUS PC' 'STSC'1982 'APL*PLUS II' 'STSC'1986 'APL+Win' 'APL2000'1997
      aaa[3;4]„›bbb
      'html'Świ'AddTable' ' border="1" cellpadding="0" cellspacing="0"' aaa
      'html'Świ'End'
      Śerase'aaa bbb'
 
Description   Inheritance   Example   Properties   Methods
 
 Properties
 
class    
Description:  Return current object class 
Syntax:  class„'obj' Świ 'class' 
debug    
Description:  Get or Set the debug mode 
Syntax:  'obj' Świ 'debug'boolean 
boolean:  0=no debug mode;  1=debug mode 
Note: when setting the debug mode a Window with Internet Explorer 
displays any change made to the HTML code 
Example: 
      'html' Świ 'debug'1 
help    
Example: 
0 0˝'html' Świ '*Create' 'THTML5' ('debug'1) 
0 0˝'html' Świ 'Start' 'My Web Page' 
0 0˝'html' Świ 'AddStyle' 'BODY {background: url(//Dell8200/C/APLWin/Objects/apl2000a.gif) no-repeat center center'} ' 
0 0˝'html' Świ 'AddStyle' 'P {color: red; font-family: Helvetica, Arial, sans-serif; font-size: 9pt; margin: 50px, 100px, 50px, 100px;'} ' 
0 0˝'html' Świ 'AddStyle' 'H1 {background-color: cyan; color: purple; text-align: center; font-size: 20pt;'} ' 
0 0˝'html' Świ 'AddStyle' 'H1.warning {color: red; font-size: 16pt; border-top: ridge 2px blue; border-bottom: ridge 2px blue;'} ' 
0 0˝'html' Świ 'AddStyle' '.small {color: gray; font-family: Arial; font-size: 8pt; font-weight: 100;'} ' 
0 0˝'html' Świ 'Add' 'H1' 'My Web Page' 
0 0˝'html' Świ 'Add' 'H1.warning' 'This is a warning!' 
0 0˝'html' Świ 'Add' 'P' (500˝'This is some text in the page ') (300˝ 'In several paragraphs ') 
0 0˝'html' Świ 'Add' 'H2.small' 'This is an H2.small title' 
0 0˝'html' Świ 'Add' 'H2' 'This is an H2 title' 
aaa„10 10˝Ľ100000 
bbb„5 5˝1000׼100 
bbb[2;3]„›3 3˝'APL*PLUS PC' 'STSC'1982 'APL*PLUS II' 'STSC'1986 'APL+Win' 'APL2000'1997 
aaa[3;4]„›bbb 
0 0˝'html' Świ 'AddTable' ' border="1" cellpadding="0" cellspacing="0"' aaa 
0 0˝'html' Świ 'End' 
Śerase'aaa bbb' 
html    
Description:  Read-only property returning the current HTML buffer content 
Syntax:  html„'obj' Świ 'html' 
Example: 
     'html' Świ 'html' 
styles    
Description:  Read-only property returning the current HTML styles defined in the page 
Syntax:  styles„'obj' Świ 'styles' 
Example: 
     'html' Świ 'styles' 
stylesfile    
Description:  Define an external Styles file for the page 
Syntax:  'obj' Świ 'stylesfile'cssfile 
cssfile:  a style file name 
Example: 
      'html' Świ 'stylesfile' 'c:\inetpub\wwwroot\lc\new\pagestyles.css' 
Description   Inheritance   Example   Properties   Methods
 
 Methods
 
Add    
Description:  Adds HTML to the current buffer 
Syntax:  'obj' Świ 'Add'tag_style text 
tag_style:  a tag or a tag with a style (example:  'H1' 'H1.warning' 'H1 .fontred') 
     'H1' refers to the H1 tag or the H1 style if one defined in the page HEAD section 
     'H1.warning' refers to the H1.warning style if one defined in the page HEAD section 
     'H1.fontred' may refer to the H1 tag with a class="fontred" style if .fontred is defined as a style in the page HEAD section 
title:  any character string 
Example: 
      'html' Świ 'Add' 'H1' 'My Web Site' 
AddAPL    
Description:  Adds APL Code to the current buffer 
Syntax:  'obj' Świ 'AddAPL'aplcode 
aplcode:  APL Code as captured in the APL Session 
Example: 
      'html' Świ 'AddAPL' ('      ˛Ľ10',Śtcnl,'10 9 8 7 6 5 4 3 2 1') 
AddImage    
Description:  Adds a list of items to the current HTML buffer 
Syntax:  'obj' Świ 'AddImage'imgfile alt legend align 
imgfile:  an image file name 
alt:  the Alternate text to be displayed when the mouse hovers the image 
legend:  a legend to be added below the image 
align:  left, center or right 
Example: 
      'html' Świ 'AddImage' 'images/Preferences50.gif' 'The New APL+Win 5.0 Preferences Dialog' 'The New APL+Win 5.0 Preferences Dialog' 'center' 
AddList    
Description:  Adds a list of items to the current HTML buffer 
Syntax:  'obj' Świ 'AddList'item1 item2 ... itemN 
item1:  a character string 
item2:  a character string 
itemN:  a character string 
Example: 
      'html' Świ 'AddList' 'APL+Dos' 'APL+Win' 'APL+Unix' 
AddStyle    
Description:  Adds (or replaces) a style to (in) the HEAD section of the page 
Syntax:  'obj' Świ 'AddStyle'cssStyle 
cssStyle:  a character string style 
Examples: 
      'html' Świ 'AddStyle' 'H1 {color: purple; font-size: 20pt;'} ' 
      'html' Świ 'AddStyle' 'H1.warning {color: red; font-weight: bold; font-size: 9px;'} ' 
AddTable    
Description:  Adds a table based on the content of an APL nested array 
Syntax:  'obj' Świ 'AddTable'attributes nestedmatrix coltitles includetitle horzcenter {colsalignment} 
attributes:  a character vector containing attributes and their values for the table 
nestedarray:  any APL nested matrix 
coltitles:  # of column title lines (maybe 0) 
includetitle:  1=nested array include table title,  0=it does not 
horzcenter:  1=horizontally center the table in the page  0(default)=don't 
colsalignment:  a numeric vector with one value per column (1=left aligned, 2=centered, 3=right aligned) 
Note: when an element is empty in a columns title line, "colspan=" is used to group column headings over several columns 
To alternate row colors in the resulting table, define a "TDROW1" and a "TDROW2" style, each having a different color 
Examples: 
      'html' Świ 'AddTable' ' border="1" cellpadding="0" cellspacing="0"' (10 10˝Ľ100) 
      'html' Świ 'AddTable' ' border="1" cellpadding="0" cellspacing="0"' ((10†›'Essai de table avec titre')®(10 10˝Ľ100))0 1(1 3 3 3 3) 
      'html' Świ 'AddTable' ' border="1" cellpadding="0" cellspacing="0"' ((10†›'Essai de table avec titre')®((›'Col '),¨•¨Ľ10)®(10 10˝Ľ100))1 1 
Cat    
Description:  Catenate text to back of HTML buffer 
Syntax:  'obj' Świ 'Cat'text 
text: simple vector or vector of text vectors 
Example: 
      'html' Świ 'Cat' '<h3>APL+Win</h3><br>' 
*:R„1Ş…0}" 
Clear    
Description:  Clears the content of the current buffer except for styles 
Syntax:  'obj' Świ 'Clear' 
Example: 
      'html' Świ 'Clear' 
ConvertExcel    
Description:  Converts specified sheets from an Excel document to HTML pages 
Syntax:  'obj' Świ 'ConvertExcel'document{sheetnos} 
document:  a complete Excel file name 
sheetnos:   sheet numbers within workbook to convert to HTML 
Note: 
1. requires TExcel5 object 
3. the resulting HTML documents take the name of the sheets 
Example: 
      'html' Świ 'ConvertExcelSheets' 'h:\aplwin\windal\essai tableau1.xls' (2 3) 
ConvertExcelSheet    
Description:  Converts an Excel sheet to an HTML page 
Syntax:  'obj' Świ 'ConvertExcel'document sheetno 
document:  a complete Excel file name 
sheetno:   sheet number within workbook to convert to HTML 
Note: 
1. requires TExcel5 object 
3. the resulting HTML document take the name of the sheet 
Example: 
      'html' Świ 'ConvertExcelSheet' 'h:\aplwin\windal\essai tableau1.xls'2 
Retrieve column widths 
End    
Description:  Completes HTML code and return it 
Syntax:  'obj' Świ 'End' 
Example: 
      'html' Świ 'End' 
FormatTable    
Description:  Formats each column of a table using ŚFMT formats 
Syntax:  nestedmat„'obj' Świ 'GroupLines'nestedmat fmt1 fmt2 ... fmtN 
nestedmat:  a nested matrix (cells maybe character and/or numeric) 
fmt1:  ŚFMT format string for column 1 
fmt2:  ŚFMT format string for column 2 
fmtN:  ŚFMT format string for column N 
Example: 
      'html' Świ 'FormatTable' (?15 5˝100000) 'I8' 'F12.3' 'BCF12.1' 'Q< %>I20' 'G<999-999-999>' 
GroupLines    
Description:  Regroup table lines by pack of N 
Syntax:  nestedmat„'obj' Świ 'GroupLines'nestedmat N 
nestedmat:  a nested matrix where each cell is character 
N:  integer (the number of lines to vertically group together) 
Example: 
      'html' Świ 'GroupLines' (•¨?15 5˝100000)3 
HTMLpos    
Description:  Returns the position of the character immediately preceding the first occurence of a given string in the HTML buffer 
Syntax:  'obj' Świ 'HTMLpos'string 
string:  any character string 
Example: 
      'html' Świ 'HTMLpos' '<BODY ' 
KeepContent    
Description:  Removes all tags down to and including the <body> tag in the HTML buffer 
Syntax:  'obj' Świ 'KeepContent' 
Example: 
      'html' Świ 'KeepContent' 
New     Description: Create a new instance of THTML5
Example:
      'obj' Świ '*Create' 'THTML5'

Print    
Description:  Ends the HTML construction and prints the document 
Syntax:  'obj' Świ 'Print' orientation header footer {margins} 
orientation:  'portrait' (default) or 'landscape' 
header:  a page header 
footer:  a page footer 
margins:  a 4-element integer vector (left top right bottom) margins in millimeters 
Notes: 
1. uses the MeadCo's ScriptX templates (see: http://www.meadroid.com/sx_intro.asp) 
   to allow defining header, footer, orientation and print margins 
2. margins are set for US Letter page size.  It's best to not define margins 
   when printing in A4 format 
Example: 
    'html' Świ 'Print' 'landscape' 'Custom Header' 'Custom Footer' (2 3 4 5) 
PrintPreview    
Description:  Ends the HTML construction and print previews the document 
Syntax:  'obj' Świ 'Print' orientation header footer {margins} 
orientation:  'portrait' (default) or 'landscape' 
header:  a page header 
footer:  a page footer 
margins:  a 4-element integer vector (left top right bottom) margins in millimeters 
Notes: 
1. uses the MeadCo's ScriptX templates (see: http://www.meadroid.com/sx_intro.asp) 
   to allow defining header, footer, orientation and print margins 
2. margins are set for US Letter page size.  It's best to not define margins 
   when printing in A4 format 
Example: 
    'html' Świ 'Print' 'landscape' 'Custom Header' 'Custom Footer' (2 3 4 5) 
RemoveStyle    
Description:  Removes a style from the HEAD section of the page 
Syntax:  'obj' Świ 'RemoveStyle'cssStyle 
cssStyle:  a character string style 
Examples: 
      'html' Świ 'RemoveStyle' 'H1' 
      'html' Świ 'RemoveStyle' 'H1.warning' 
      'html' Świ 'RemoveStyle' '.par' 
ShowCode    
Description:  Returns the HTML code produced so far 
Syntax:  'obj' Świ 'ShowCode' 
Example: 
      'html' Świ 'ShowCode' 
SortTable    
Description:  Allows to sort an HTML table based on a given column according to a list of items 
Syntax:  html„'obj' Świ 'SortTable'html colno {items} 
html:  a table HTML code 
colno:  a column number 
items:  a nested vector of item values contained in the specified column 
Note:  if items is omitted then the table rows are alphabetically sorted based on 
items in the specified columns, otherwise the resulting table contains only 
rows from the original table which contains the specified items in the order 
of the specified items 
Start    
Description:  Start a new HTML page (discard any HTML buffer built so far) 
Syntax:  html„'obj' Świ 'Start' {pagetitle} 
**TO BE ADDED: {bodyattributes} 
pagetitle:  character vector (the page title for the TITLE tag in the HEAD section) 
Note: Remember that the page title does not display in the HTML page 
Example: 
      'html' Świ 'Start' 'Lescasse Consulting Home Page' 
Table    
Description:  Returns the HTML code for a given simple APL matrix 
Syntax:  'obj' Świ 'Table'styleclass nestedmatrix depth 
styleclass:  one of the styles class (=starting with a .) defined in the page or '' for no style 
nestedarray:  any APL nested matrix 
depth:  table depth within original matrix 
Examples: 
      'html' Świ 'Table' '.small' (10 10˝Ľ100)1 
UpdatePage    
Description:  Updates a Web site page, replacing it with the content of the current HTML buffer 
Syntax:  'obj' Świ 'UpdatePage'pagefilename{keepcontent} 
pagefilename:  a Web site complete DOS file name 
keepcontent:  (optional) 
              0(default)=do not change HTML buffer 
              1=remove all tags down to and including the <BODY> tag 
Example: 
      'html' Świ 'UpdatePage' 'c:\inetpub\wwwroot\lc\new\APLWin50_.asp'1 
Description   Inheritance   Example   Properties   Methods
 
 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.