1396

Clarion - ABC Library Reference

  • Upload
    ramzes

  • View
    1.607

  • Download
    26

Embed Size (px)

DESCRIPTION

This book provides in-depth discussions of the ABC Library. It shows you how the ABCTemplates use the powerful ABC Library objects—and how you can use, reuse, andmodify the classes with the ABC Templates or within your hand-coded project.These are the tools you’ll continue to refer to regardless of your expertise with Clarion.The depths of information on these tools and the consequent versatility you can achievewith them is virtually unlimited.

Citation preview

2

ABC Library Reference COPYRIGHT 1994-2003 SoftVelocity Incorporated. All rights reserved.This publication is protected by copyright and all rights are reserved by SoftVelocity Incorporated. It may not, in whole or part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent, in writing, from SoftVelocity Incorporated.

This publication supports Clarion. It is possible that it may contain technical or typographical errors. SoftVelocity Incorporated provides this publication as is, without warranty of any kind, either expressed or implied.

SoftVelocity Incorporated 2769 East Atlantic Blvd. Pompano Beach, Florida 33062 (954) 785-4555 www.softvelocity.com

Trademark Acknowledgements: SoftVelocity is a trademark of SoftVelocity Incorporated. Clarion is a trademark of SoftVelocity Incorporated. Btrieve is a registered trademark of Pervasive Software. Microsoft, Windows, and Visual Basic are registered trademarks of Microsoft Corporation. All other products and company names are trademarks of their respective owners.

Printed in the United States of America (1103)

Contents and Forward

3

Contents:Foreword 45Welcome .....................................................................................................................45 Documentation Conventions.......................................................................................46 Keyboard Conventions .........................................................................................46 Other Conventions................................................................................................46

ABC Library Overview

47

About This Book..........................................................................................................47 Application Builder Class (ABC) Library .....................................................................47 Class Libraries Generally .....................................................................................47 Application Builder ClassesThe ABCs of Rapid Application Development ......47 ABC Library and the ABC Templates...................................................................51 ABC Coding Conventions..................................................................................................53 Method Names .....................................................................................................53 Where to Initilize & Kill Objects ............................................................................55 Return Values.......................................................................................................55 PRIVATE (undocumented) Items .........................................................................56 PROTECTED, VIRTUAL, DERIVED, and PROC Attributes ................................57 Documentation Conventions .............................................................................................58 Reference Item and Syntax Diagram ...................................................................58 Property (short description of intended use) ........................................................58 Method (short description of what the method does) ...........................................58 Conceptual Example ............................................................................................60

ASCIIFileClass

61

ASCIIFileClass Overview............................................................................................61 AsciiFileClass Properties ............................................................................................64 ASCIIFile (the ASCII file) .....................................................................................64 ErrorMgr (ErrorClass object) ...............................................................................64 OpenMode (file access/sharing mode).................................................................64 AsciiFileClass Methods...............................................................................................65 ASCIIFileClass Functional Organization--Expected Use ....................................65 FormatLine (a virtual to format text) ....................................................................66 GetDOSFilename (let end user select file) ..........................................................67 GetFilename (return the filename) ......................................................................68 GetLastLineNo (return last line number) .............................................................69 GetLine (return line of text) ..................................................................................70 GetPercentile (convert file position to percentage:ASCIIFileClass) ....................71 Init (initialize the ASCIIFileClass object) .............................................................72 Kill (shut down the ASCIIFileClass object) ..........................................................73 Reset (reset the ASCIIFileClass object) ..............................................................74 SetLine (a virtual to position the file) ...................................................................75 SetPercentile (set file to relative position) ...........................................................76

4

ABC Library Reference ValidateLine (a virtual to implement a filter) ........................................................77

ASCIIPrintClass

79

ASCIIPrintClass Overview ........................................................................................79 AsciiPrintClass Properties...........................................................................................82 FileMgr (AsciiFileClass object:AsciiPrintClass) ...................................................82 PrintPreview (print preview switch) .....................................................................82 Translator (TranslatorClass object:AsciiPrintClass) ............................................82 AsciiPrintClass Methods .............................................................................................83 Ask (solicit print specifications) ...........................................................................83 Init (initialize the ASCIIPrintClass object) ............................................................84 PrintLines (print or preview specified lines) .........................................................85

ASCIISearchClass

87

ASCIISearchClass Overview ....................................................................................87 AsciiSearchClass Properties.......................................................................................90 Find (search constraints) .....................................................................................90 FileMgr (AsciiFileClass object:AsciiSearchClass) ...............................................91 LineCounter (current line number) ......................................................................91 Translator (TranslatorClass object:ASCIISearchClass) ......................................91 AsciiSearchClass Methods .........................................................................................92 Ask (solicit search specifications) ........................................................................92 Init (initialize the ASCIISearchClass object) ........................................................93 Next (find next line containing search text) .........................................................94 Setup (set search constraints) .............................................................................95

ASCIIViewerClass

97

ASCIIViewerClass Overview .....................................................................................97 AsciiViewerClass Properties .....................................................................................100 Popup (PopupClass object) ...............................................................................100 Printer (ASCIIPrintClass object) ........................................................................100 Searcher (ASCIISearchClass object) ................................................................101 TopLine (first line currently displayed)................................................................101 AsciiViewerClass Methods........................................................................................102 AsciiViewerClass Functional Organization--Expected Use ...............................102 AddItem (program the AsciiViewer object) ........................................................104 AskGotoLine (go to user specified line) ............................................................105 DisplayPage (display new page) .......................................................................106 Init (initialize the ASCIIViewerClass object) ......................................................107 Kill (shut down the ASCIIViewerClass object) ...................................................109 PageDown (scroll down one page) ...................................................................111 PageUp (scroll up one page) .............................................................................112 Reset (reset the ASCIIViewerClass object) ......................................................113 SetLine (position to specific line) .......................................................................114 SetLineRelative (move n lines) ..........................................................................115 SetTranslator (set run-time translator:ASCIIViewerClass) ...............................116

Contents and Forward

5

TakeEvent (process ACCEPT loop event:ASCIIViewerClass) .........................117

BreakManagerClass

119

BreakManagerClass - Overview.........................................................................119 BreakManagerClass - Concepts ........................................................................119 BreakManagerClass - Relationship to Other Application Builder Classes.........119 BreakManagerClass - ABC Template Implementation ......................................119 BreakManagerClass - Source Files...................................................................120 BreakManagerClass - Conceptual Example ......................................................120 BreakManagerClass - Properties.............................................................................123 BreakManagerClass - Methods ................................................................................123 AddBreak (add a Break).....................................................................................123 AddLevel (add a Level to the BreakId Break) ....................................................124 AddResetField (add a reset field to the last Level added) .................................125 AddTotal (add a total field to the last Level added)............................................126 Construct (automatic initialization of the BreakManager object) ........................127 Destruct (automatic destroy of the Breakmanager object).................................127 Init (initialize the BreakManager object) .............................................................127 TakeEnd (Break closed) .....................................................................................128 TakeStart (Break opened) ..................................................................................129 UpdateTotal (Calculate Break totaling) ..............................................................130

BrowseEIPManagerClass

131

BrowseEIPManagerClass--Overview .....................................................................131 BrowseEIPManagerClass Concepts.........................................................................132 BrowseEIPManagerClass--Relationship to Other Application Builder Classes ......133 BrowseEIPManagerClass--ABC Template Implementation ...................................133 BrowseEIPManagerClass Source Files ..................................................................133 BrowseEIPManagerClass--Conceptual Example ...................................................134 BrowseEIPManagerClass Properties .......................................................................137 BrowseEIPManagerClass Properties ................................................................137 BC (browse class) ............................................................................................137 BrowseEIPManagerClass Methods ..........................................................................138 BrowseEIPManagerClass--Functional Organization--Expected Use ...............138 ClearColumn (reset column property values) ....................................................139 Init (initialize the BrowseEIPManagerClass object) ...........................................140 Kill (shut down the BrowseEIPManagerClass object) .......................................141 TakeCompleted (process completion of edit) ....................................................142 TakeNewSelection (reset edit-in-place column) ...............................................143

BrowseClass

145

BrowseClass Overview ...........................................................................................145 BrowseClass Properties............................................................................................150 BrowseClass Properties ....................................................................................150 ActiveInvisible (obscured browse list action) .....................................................150 AllowUnfilled (display filled list) .........................................................................151

6

ABC Library Reference ArrowAction (edit-in-place action on arrow key) ................................................152 AskProcedure (update procedure) ....................................................................153 ChangeControl (browse change/update control number) .................................153 CurrentChoice (current LIST control entry number) ..........................................154 DeleteAction (edit-in-place action on delete key)...............................................154 DeleteControl (browse delete control number) .................................................154 EditList (list of edit-in-place controls) .................................................................155 EIP (edit-in-place manager) ..............................................................................155 EnterAction (edit-in-place action on enter key) .................................................156 FocusLossAction (edit-in-place action on lose focus) ......................................157 HasThumb (vertical scroll bar flag) ...................................................................158 HideSelect (hide select button) ........................................................................158 ILC(reference to IListControl interface) ...........................................................158 InsertControl (browse insert control number) ...................................................159 ListQueue (browse data queue reference) .......................................................159 Loaded (browse queue loaded flag) .................................................................159 Popup (browse popup menu reference) ...........................................................160 PrevChoice (prior LIST control entry number) ...................................................160 PrintControl (browse print control number) ........................................................160 PrintProcedure (print procedure)........................................................................161 Processors (reference to ProcessorQueue) ....................................................161 Query (reference to QueryClass) .......................................................................161 QueryControl (browse query control number)....................................................162 QueryShared (share query with multiple sorts)..................................................162 QuickScan (buffered reads flag) .......................................................................163 RetainRow (highlight bar refresh behavior) ......................................................164 SelectControl (browse select control number) .................................................164 Selecting (select mode only flag) .....................................................................165 SelectWholeRecord (select entire record flag) .................................................165 Sort (browse sort information) ..........................................................................166 StartAtCurrent (initial browse position) .............................................................167 TabAction (edit-in-place action on tab key) ......................................................168 Toolbar (browse Toolbar object) ......................................................................169 ToolbarItem (browse ToolbarTarget object) .....................................................170 ToolControl (browse toolbox control number) ....................................................171 ViewControl (view button) ...............................................................................171 Window (WindowManager object) ....................................................................171 BrowseClass Methods ..............................................................................................172 BrowseClass Methods........................................................................................172 BrowseClass Functional Organization--Expected Use ......................................172 AddEditControl (specify custom edit-in-place class) ........................................174 AddField (specify a FILE/QUEUE field pair) ....................................................175 AddItem(program the BrowseClass object) ....................................................176 AddLocator (specify a locator) ..........................................................................176 AddResetField (set a field to monitor for changes) ..........................................177 AddSortOrder (specify a browse sort order) ....................................................178 AddToolbarTarget (set the browse toolbar) .....................................................179

Contents and Forward

7

ApplyRange (refresh browse based on resets and range limits) .....................180 Ask (update selected browse item) ..................................................................181 AskRecord (edit-in-place selected browse item) ..............................................183 Fetch (get a page of browse items) ..................................................................184 Init(initialize the BrowseClass object) ..............................................................185 InitSort (initialize locator values) ......................................................................186 Kill (shut down the BrowseClass object) ..........................................................187 Next (get the next browse item) .......................................................................188 NotifyUpdateError (throw error on update).........................................................189 PostNewSelection (post an EVENT:NewSelection to the browse list) .............190 Previous (get the previous browse item) ..........................................................191 Records (return the number of browse queue items) .......................................192 ResetFields(reinitialize FieldPairsClass) .........................................................192 ResetFromAsk (reset browse after update) .....................................................193 ResetFromBuffer (fill queue starting from record buffer) ..................................195 ResetFromFile (fill queue starting from file POSITION) ...................................196 ResetFromView (reset browse from current result set) ....................................197 ResetQueue (fill or refill queue) ........................................................................198 ResetResets (copy the Reset fields) ................................................................199 ResetSort (apply sort order to browse) ............................................................200 ScrollEnd (scroll to first or last item) .................................................................201 ScrollOne (scroll up or down one item) ............................................................202 ScrollPage (scroll up or down one page) .........................................................203 SetAlerts (alert keystrokes for list and locator controls) ...................................204 SetLocatorField (set sort free element to passed field)......................................205 SetLocatorFromSort (use sort like locator field) .................................................205 SetQueueRecord (copy data from file buffer to queue buffer:BrowseClass) .....206 SetSort (apply a sort order to the browse) .......................................................207 TakeAcceptedLocator (apply an accepted locator value) ................................208 TakeEvent (process the current ACCEPT loop event:BrowseClass) ..............209 TakeKey (process an alerted keystroke:BrowseClass) ....................................210 TakeNewSelection (process a new selection:BrowseClass) ...........................211 TakeScroll (process a scroll event) ..................................................................212 TakeVCRScroll (process a VCR scroll event) ..................................................213 UpdateBuffer (copy selected item from queue buffer to file buffer) .................214 UpdateQuery (set default query interface) ......................................................215 UpdateResets (copy reset fields to file buffer) .................................................216 UpdateThumb (position the scrollbar thumb) ...................................................217 UpdateThumbFixed (position the scrollbar fixed thumb) ..................................218 UpdateViewRecord (get view data for the selected item) ................................219 UpdateWindow (update display variables to match browse) ...........................220

BrowseQueue Interface

221

BrowseQueue Concepts .........................................................................................221 Relationship to Other Application Builder Classes .................................................221 BrowseQueue Source Files ....................................................................................221 BrowseQueue Methods ..........................................................................................222

8

ABC Library Reference Delete(remove entry in LIST queue) ...............................................................222 Fetch(retrieve entry from LIST queue) ............................................................222 Free(clear contents of LIST queue) .................................................................222 GetViewPosition(retrieve VIEW position) ........................................................222 Insert(add entry to LIST queue) ......................................................................223 Records(return number of records) .................................................................223 SetViewPosition(set VIEW position) ................................................................223 Update(update entry in LIST queue) ...............................................................224 Who(returns field name) ..................................................................................224

BrowseToolbarClass

225

BrowseToolbarClass Overview ..............................................................................225 BrowseToolbarClass Concepts .............................................................................225 Relationship to Other Application Builder Classes ................................................225 BrowseToolbarClass ABC Template Implementation ...........................................225 BrowseToolbarClass Source Files .........................................................................225 BrowseToolbarClass Properties ...............................................................................226 Browse (BrowseClass object) .........................................................................226 Button (toolbar buttons FEQ values) ...............................................................227 Window (WindowManager object) ...................................................................227 BrowseToolbarClass Methods ..................................................................................228 Init (initialize the BrowseToolbarClass object) ................................................228 InitBrowse (initialize the BrowseToolbarClass update buttons) ......................228 InitMisc (initialize the BrowseToolbarClass miscellaneous buttons) ...............229 InitVCR (initialize the BrowseToolbarClass VCR buttons) ..............................230 ResetButton (synchronize toolbar with a corresponding browse control) ..........231 ResetFromBrowse(synchronize toolbar controls with browse controls) .........232 TakeEvent(process the current event) ............................................................232

BufferedPairsClass

233

BufferedPairsClass Overview .................................................................................233 BufferedPairsClass Properties..................................................................................235 BufferedPairsClass Properties .........................................................................235 RealList (recognized field pairs) .......................................................................235 BufferedPairsClass Methods ....................................................................................236 BufferedPairsClass Methods ............................................................................236 BufferedPairsClass Functional Organization Expected Use ............................236 AddPair (add a field pair:BufferedPairsClass) ..................................................238 AssignBufferToLeft (copy from "buffer" fields to "left" fields) ...........................240 AssignBufferToRight (copy from "buffer" fields to "right" fields) .......................241 AssignLeftToBuffer (copy from "left" fields to "buffer" fields) ...........................242 AssignRightToBuffer (copy from "right" fields to "buffer" fields) .......................243 EqualLeftBuffer (compare "left" fields to "buffer" fields) ...................................244 EqualRightBuffer (compare "right" fields to "buffer" fields) ..............................245 Init (initialize the BufferedPairsClass object) ....................................................246 Kill (shut down the BufferedPairsClass object) ................................................247

Contents and Forward

9

ConstantClass

249

ConstantClass Overview .........................................................................................249 ConstantClass Properties .........................................................................................253 TerminatorField (identify the terminating field) .................................................253 TerminatorInclude (include matching terminator record) .................................253 TerminatorValue (end of data marker) .............................................................254 ConstantClass Methods............................................................................................255 ConstantClass Functional Organization--Expected Use ..................................255 AddItem (set constant datatype and target variable) .......................................256 Init (initialize the ConstantClass object) ...........................................................257 Kill (shut down the ConstantClass object) ........................................................259 Next (load all constant items to file or queue) ................................................260 Next (copy next constant item to targets) .........................................................262 Reset (reset the object to the beginning of the constant data) ........................263 Set (set the constant data to process) ..............................................................264

Crystal8 Class

265

Crystal8 Class Properties .........................................................................................266 Crystal8 Methods ......................................................................................................267 AllowPrompt (prompt for runtime parameter data) ...................................................267 CanDrillDown(allow Crystal drill down support ).......................................................268 HasCancelButton (display cancel button on report preview)....................................269 HasCloseButton (display close button on report preview) ........................................270 HasExportButton (display export button on report preview) .....................................271 HasLaunchButton (display launch button on report preview) ...................................272 HasNavigationControls (display navigation controls on report preview) ..................273 HasPrintButton (display print button on report preview) ...........................................274 HasPrintSetupButton (display print setup button on report preview)........................275 HasProgressControls (display progress controls on report preview) .......................276 HasRefreshButton (display refresh button on report preview)..................................277 HasSearchButton (display search button on report preview) ...................................278 HasZoomControl (display zoom control on report preview) .....................................279 Init (initialize Crystal8 object) ....................................................................................280 Kill (shut down Crystal8 object)................................................................................281 Preview (preview a Crystal Report) ..........................................................................282 _Print (print a Crystal Report) ...................................................................................283 Query (retrieve or set the SQL data query) ..............................................................284 SelectionFormula (retrieve or set the Crystal formula ) ............................................285 ShowDocumentTips (show tips on docuement in the preview window) ...................286 ShowReportControls (show print controls) ...............................................................287 ShowToolbarTips (show tips on preview window toolbar)........................................288

cwRTF Class

289

cwRTF Overview .....................................................................................................289 cwRTF Class Concepts ..........................................................................................289 cwRTF Relationship to Other Application Builder Classes .....................................290

10

ABC Library Reference cwRTF ABC Template Implementation ..................................................................290 cwRTF Source Files ................................................................................................290 cwRTF Properties .....................................................................................................291 cwRTF Properties .............................................................................................291 hRTFWindow(RTF control handle) ..................................................................291 cwRTF Methods ........................................................................................................292 AlignParaCenter (center paragraph) ...............................................................292 AlignParaLeft (left justify paragraph) ...............................................................292 AlignParaRight (right justify paragraph) ..........................................................292 ChangeFontStyle (set current font style) .........................................................293 CanRedo (check for redo data) .......................................................................293 CanUndo (check for undo data) ......................................................................294 Color (set text color) ........................................................................................294 Copy (copy selected text to clipboard) ............................................................294 Cut (cut selected text ) ....................................................................................295 Find (set current font style) ..............................................................................295 FlatButtons (use flat button style) ....................................................................296 Font (apply font attributes) ..............................................................................297 GetText (copy text to variable) ........................................................................298 Init (initialize the cwRTF object) ......................................................................299 IsDirty (indicates modified data) ......................................................................300 Kill (shut down the csRTF object) ....................................................................301 LeftIndent (indent the current or selected paragraph) .....................................301 LimitTextSize (limit amount of text) .................................................................302 LoadField (load rich text data from field) .........................................................302 LoadFile (load rich text data from file) .............................................................303 NewFile (clear rich text data) ...........................................................................303 Offset (offset current or selected paragraph) ..................................................303 PageSetup (set page attributes) ......................................................................304 ParaBulletsOff (turn off paragraph bullets) ......................................................304 ParaBulletsOn (turn on paragraph bullets) ......................................................304 Paste (paste text from clipboard) ....................................................................305 _Print (print rich text control contents) .............................................................305 Redo (reapply action) ......................................................................................306 Replace (find and replace search) ..................................................................306 ResizeControls (used internally) .....................................................................306 RightIndent (indent the current or selected paragraph) ..................................307 SaveField (save rich text data to field) ............................................................307 SaveFile (save rich text data to file) ................................................................308 SelectText (select characters) .........................................................................308 SetDirtyFlag (set modified flag) .......................................................................309 SetFocus (give rich text control focus) ............................................................309 SetText (place text into rich text control) .........................................................310 ShowControl (hide/unhide RTF control) ..........................................................311 Undo (undo action) ..........................................................................................311

Contents and Forward

11

DbAuditManager

313

DbAuditManager Overview .....................................................................................313 Relationship to Other Application Builder Classes .................................................313 DbAuditManager ABC Template Implementation ...................................................313 DbAuditManager Source Files ................................................................................313 DbAuditManager Properties......................................................................................314 Action (log file action column) .........................................................................314 ColumnInfo (log file column queue) .................................................................314 LogFiles (log file queue) ..................................................................................314 FM (DbLogFileManager object) .......................................................................315 Errors (ErrorClass object) ................................................................................315 DbAuditManager Methods ........................................................................................316 AddItem (maintain the columninfo structure) ..................................................316 AddLogFile (maintain log file structure) ...........................................................317 AppendLog (initiate audit log file update) ........................................................317 BeforeChange (update audit log file before file change) .................................318 CreateHeader (create log file header records) ................................................318 Init (initialize the DbAuditManager object) .......................................................319 Kill (shut down DbAuditManger object) ...........................................................319 OnChange (update audit log file after a record change) .................................320 OnDelete (update audit log file when a record is deleted) ..............................320 OnFieldChange (virtual method for each field change) ...................................321 OnInsert (update audit log file when a record is added) .................................322 OpenLogFile (open the audit log file) ..............................................................322 SetFM (determine log file status) ....................................................................323

DbChangeManager

325

DbChangeManager Overview ..................................................................................325 Relationship to Other Application Builder Classes .................................................325 DbChangeManager ABC Template Implementation ..............................................325 DbChangeManager Source Files ...........................................................................325 DbChangeManager Properties .................................................................................326 NameQueue (pointer into trigger queue) ........................................................326 TriggerQueue (pointer to BFP for field changes) ............................................326 DbChangeManager Methods....................................................................................327 AddItem (maintain the namequeue structure) .................................................327 AddThread (maintains the triggerqueue) ........................................................327 CheckChanges(check record for changes) .....................................................328 CheckPair(check field pairs for changes) ........................................................328 Equal(checks for equal before and after values) .............................................329 Init (initialize the DbChangeManager object) ..................................................329 Kill (shut down DbChangeManger object) .......................................................330 SetThread (read triggerqueue) ........................................................................330 Update (update the audit log file buffer) ..........................................................331

12

ABC Library Reference

DbLogFileManager

333

DbLogFileManager Overview .................................................................................333 Relationship to Other Application Builder Classes .................................................333 DbLogFileManager ABC Template Implementation ...............................................333 DbLogFileManager Source Files ............................................................................333 DbLogFileManager Properties ..................................................................................334 DbLogFileManager Properties .........................................................................334 Opened (file opened flag) ................................................................................334 DbLogFileManager Methods.....................................................................................335 DbLogFileManager Methods ............................................................................335 Init (initialize the DbLogFileManager object) ...................................................335

EditClass

337

EditClass Overview .................................................................................................337 EditClass Concepts .................................................................................................337 Relationship to Other Application Builder Classes .................................................337 ABC Template Implementation ...............................................................................338 EditClass Source Files ............................................................................................338 EditClass Conceptual Example ..............................................................................339 EditClass Properties .................................................................................................343 FEQ (the edit-in-place control number) ............................................................343 ReadOnly ( edit-in-place control is read-only) ....................................................343 EditClass Methods ....................................................................................................344 Functional Organization--Expected Use ..........................................................344 CreateControl (a virtual to create the edit control) ...........................................345 Init (initialize the EditClass object) ....................................................................346 Kill (shut down the EditClass object) ................................................................347 SetAlerts (alert keystrokes for the edit control) ................................................347 SetReadOnly (set edit control to read-only) ....................................................348 TakeAccepted (validate EIP field) ......................................................................348 TakeEvent (process edit-in-place events) .......................................................349

EditSpinClass

351

EditSpinClass--Overview ........................................................................................351 EditSpinClass Concepts .........................................................................................351 EditSpinClass -- Relationship to Other Application Builder Classes ......................351 EditSpinClass--ABC Template Implementation ......................................................351 EditSpinClass--Conceptual Example ......................................................................352 EditSpinClass Properties ..........................................................................................355 EditSpinClass Properties ..................................................................................355 EditSpinClass Methods.............................................................................................356 EditSpinClass Methods ....................................................................................356 EditSpinClass--Functional Organization--Expected Use .................................356 CreateControl (create the edit-in-place SPIN control) ......................................357

Contents and Forward

13

EditCheckClass

359

EditCheckClass Overview .......................................................................................359 EditCheckClass Concepts ......................................................................................359 EditCheckClass Relationship to Other Application Builder Classes .......................359 EditCheckClass ABC Template Implementation ....................................................359 EditCheckClass Source Files ..................................................................................359 EditCheckClass Conceptual Example ....................................................................361 EditCheckClass Properties .......................................................................................364 EditCheckClass Methods..........................................................................................365 EditCheckClass Functional OrganizationExpected Use ...............................365 CreateControl (create the edit-in-place CHECK control) .................................366

EditColorClass

367

EditColorClassOverview .........................................................................................367 EditColorClass Concepts ........................................................................................367 EditColorClass Relationship to Other Application Builder Classes ........................367 EditColorClass ABC Template Implementation ......................................................367 EditColorClass Source Files .....................................................................................368 EditColorClass Conceptual Example ......................................................................369 EditColorClass Properties.........................................................................................373 EditColorClass Properties ................................................................................373 Title (color dialog title text) ...............................................................................373 EditColorClass Methods ...........................................................................................374 EditColorClass Functional Organization--Expected Use .................................374 CreateControl (create the edit-in-place control) ...............................................375 TakeEvent (process edit-in-place events:EditColorClass) ..............................376

EditDropComboClass

377

EditDropComboClass Overview .............................................................................377 EditDropComboClass Concepts .............................................................................377 Relationship to Other Application Builder Classes .................................................377 EditDropComboClass ABC Template Implementation ...........................................377 EditDropComboClass Source Files ........................................................................378 EditDropComboClass Conceptual Example ...........................................................379 EditDropComboClass Properties ............................................................................382 EditDropComboClass Methods .............................................................................383 EditDropComboClass Functional Organization ......................................................383 CreateControl (create the edit-in-place COMBO control) ......................................384

EditDropListClass

385

EditDropListClass Overview ...................................................................................385 EditDropListClass Concepts ...................................................................................385 EditDropListClass Relationship to Other Application Builder Classes ...................385 EditDropListClass ABC Template Implementation .................................................385 EditDropListClass Source Files ..............................................................................385 EditDropListClass Conceptual Example .................................................................387

14

ABC Library Reference EditDropListClass Properties ....................................................................................390 EditDropListClass Properties ...........................................................................390 EditDropListClass Methods.......................................................................................391 EditDropListClass Functional Organization--Expected Use .............................391 CreateControl (create the edit-in-place DROPLIST control) ............................392 SetAlerts (alert keystrokes for the edit control:EditDropListClass) ..................393 SetReadOnly (set edit control to read-only:EditDropClass) ............................394 TakeEvent (process edit-in-place events:EditDropList Class) ........................395

EditEntryClass

397

EditEntryClass Overview ........................................................................................397 EditEntryClass Concepts ........................................................................................397 EditEntryClass Relationship to Other Application Builder Classes .........................397 EditEntryClass ABC Template Implementation ......................................................398 EditEntryClass Source Files ...................................................................................398 EditEntryClass Conceptual Example ......................................................................398 EditEntryClass Properties .........................................................................................402 EditEntryClass Properties ................................................................................402 EditEntryClass Methods............................................................................................403 EditEntryClass Methods ...................................................................................403 EditEntryClass Functional Organization--Expected Use ..................................403 CreateControl (create the edit-in-place ENTRY control) ..................................404

EditFileClass

405

EditFileClass Overview ...........................................................................................405 EditFileClass Concepts ...........................................................................................405 EditFileClass Relationship to Other Application Builder Classes ...........................405 EditFileClass ABC Template Implementation .........................................................405 EditFileClass Source Files ......................................................................................406 EditFileClass Conceptual Example .........................................................................407 EditFileClass Properties............................................................................................411 EditFileClass Properties ...................................................................................411 FileMask (file dialog behavior) ..........................................................................411 FilePattern (file dialog filter) ..............................................................................411 Title (file dialog title text) ...................................................................................412 EditFileClass Methods ..............................................................................................413 EditFileClass Functional Organization--Expected Use ....................................413 CreateControl (create the edit-in-place control:EditFileClass) .........................414 TakeEvent (process edit-in-place events:EditFileClass) .................................415

EditFontClass

417

EditFontClass Overview ..........................................................................................417 EditFontClass Concepts .........................................................................................417 EditFontClass Relationship to Other Application Builder Classes ..........................417 EditFontClass ABC Template Implementation .......................................................417 EditFontClass Source Files .....................................................................................418

Contents and Forward

15

EditFontClass Conceptual Example .......................................................................419 EditFontClass Properties ..........................................................................................423 EditFontClass Properties ..................................................................................423 Title (font dialog title text) .................................................................................423 EditFontClass Methods.............................................................................................424 EditFontClass Methods ....................................................................................424 EditFontClass Functional Organization--Expected Use ...................................424 CreateControl (create the edit-in-place control:EditFontClass) .......................425 TakeEvent (process edit-in-place events:EditFontClass) ...............................426

EditMultiSelectClass

427

EditMultiSelectClass Overview ...............................................................................427 EditMultiSelectClass Concepts ...............................................................................427 EditMultiSelectClass Relationship to Other Application Builder Classes ...............427 EditMultiSelectClass ABC Template Implementation .............................................428 EditMultiSelectClass Source Files ..........................................................................428 EditMultiSelectClass Conceptual Example .............................................................429 EditMultiSelectClass Properties................................................................................434 EditMultiSelectClass Properties .......................................................................434 Title (font dialog title text:EditMultiSelectClass) ...............................................434 EditMultiSelectClass Methods ..................................................................................435 EditMultiSelectClass Methods ..........................................................................435 EditMultiSelectClass Functional Organization--Expected Use ........................435 AddValue (prime the MultiSelect dialog) ..........................................................437 CreateControl (create the edit-in-place control:EditMultiSelectClass) .............438 Reset (reset the EditMultiSelectClass object) ..................................................438 TakeAction (process MultiSelect dialog action) ..............................................439 TakeEvent (process edit-in-place events:EditMultiSelectClass) .....................442

EditTextClass

443

EditTextClass: Overview .........................................................................................443 EditTextClass Properties ..........................................................................................445 Title (text dialog title text) ................................................................................445 EditTextClass Methods .............................................................................................446 CreateControl (create the edit-in-place control:EditTextClass) .......................447 TakeEvent (process edit-in-place events:EditTextClass) ...............................448

EIPManagerClass

449

EIPManagerClass--Overview ..................................................................................449 EIPManagerClass Concepts ...................................................................................449 EIPManagerClass--Relationship to Other Application Builder Classes ..................449 EIPManagerClass--ABC Template Implementation .................................................450 EIPManagerClass Source Files ..............................................................................450 EIPManagerClass--Conceptual Example ...............................................................451 EIPManagerClass Properties....................................................................................454 Again (column usage flag) ................................................................................454

16

ABC Library Reference Arrow (edit-in-place action on arrow key) ........................................................454 Column (listbox column) ...................................................................................454 Enter (edit-in-place action on enter key) .........................................................455 EQ (list of edit-in-place controls) .....................................................................455 Fields (managed fields) ....................................................................................456 FocusLoss ( action on loss of focus) ................................................................456 Insert (placement of new record) ......................................................................457 ListControl (listbox control number) ..................................................................458 LastColumn (previous edit-in-place column) ....................................................458 Repost (event synchronization) ........................................................................459 RepostField (event synchronization field) ........................................................459 Req (database request) ....................................................................................460 SeekForward (get next field flag) .....................................................................460 Tab (action on a tab key) ..................................................................................460 EIPManagerClass Methods ......................................................................................461 EIPManagerClass--Functional Organization--Expected Use ...........................461 AddControl (register edit-in-place controls) ......................................................463 ClearColumn (reset column property values:EIPManagerClass) ....................464 GetEdit (identify edit-in-place field) ..................................................................465 Init (initialize the EIPManagerClass object) ......................................................466 InitControls (initialize edit-in-place controls) .....................................................466 Kill (shut down the EIPManagerClass object) ..................................................467 Next (get the next edit-in-place field) ................................................................468 ResetColumn (reset edit-in-place object to selected field) ...............................469 Run (run the EIPManager) ..............................................................................470 TakeAcceptAll (validate completed row) ............................................................470 TakeAction (process edit-in-place action) ........................................................471 TakeCompleted (process completion of edit:EIPManagerClass) ....................472 TakeEvent (process window specific events) .................................................473 TakeFieldEvent (process field specific events) ...............................................474 TakeFocusLoss (a virtual to process loss of focus) .........................................475 TakeNewSelection (reset edit-in-place column:EIPManagerClass) ...............476

EntryLocatorClass

477

EntryLocatorClass Overview ...................................................................................477 EntryLocatorClass Properties ...................................................................................481 EntryLocatorClass Properties ...........................................................................481 Shadow (the search value) ...............................................................................481 EntryLocatorClass Methods......................................................................................482 GetShadow(return shadow value) ...................................................................482 Init (initialize the EntryLocatorClass object) .....................................................483 Set (restart the locator:EntryLocatorClass) ......................................................484 SetShadow(set shadow value) ........................................................................485 TakeAccepted (process an accepted locator value:EntryLocatorClass) ..........485 TakeKey (process an alerted keystroke:EntryLocatorClass) ...........................486 Update (update the locator control and free elements) ....................................487 UpdateWindow (redraw the locator control) .....................................................487

Contents and Forward

17

ErrorClass

489

ErrorClass Overview .........................................................................................489 ErrorClass Source Files .....................................................................................489 Multiple Customizable Levels of Error Treatment ..............................................490 Predefined Windows and Database Errors ........................................................491 Dynamic Extensibility of Errors...........................................................................491 ErrorClass ABC Template Implementation ........................................................491 ErrorClass Relationship to Other Application Builder Classes...........................491 ErrorClass Macro Expansion..............................................................................492 ErrorClass Multi-Language Capability................................................................493 ErrorClass Conceptual Example ........................................................................494 ErrorClass Properties................................................................................................495 ErrorClass Properties .......................................................................................495 DefaultCategory (error category) .....................................................................495 ErrorLog (errorlog interface) ............................................................................495 Errors (recognized error definitions) .................................................................496 FieldName (field that produced the error) ........................................................497 FileName (file that produced the error) ............................................................497 History (error history structure) ........................................................................497 HistoryResetOnView(clear error history log file) .............................................498 HistoryThreshold (determine size of error history) ..........................................498 HistoryViewLevel (trigger error history) ...........................................................498 KeyName (key that produced the error) ...........................................................498 LogErrors (turn on error history logging) .........................................................499 MessageText (custom error message text) ......................................................499 Silent (silent error flag) ....................................................................................499 ErrorClass Methods ..................................................................................................500 ErrorClass Functional Organization--Expected Use ........................................500 AddErrors (add or override recognized errors) ................................................502 AddHistory (update History structure) .............................................................503 GetCategory (retrieve error category) .............................................................503 GetError (Retrieve the current error message) ..................................................503 GetErrorcode (Retrieve the current Errorcode) ..................................................504 GetProcedureName (return procedure name ) ...............................................504 HistoryMsg (initialize the message window) ...................................................505 Init (initialize the ErrorClass object) ..................................................................506 Kill (perform any necessary termination code) .................................................507 Message (display an error message) ...............................................................508 Msg (initiate error message destination) .........................................................509 MessageBox (display error message to window) ............................................510 RemoveErrors (remove or restore recognized errors) .....................................511 ResetHistory(clear History structure) ..............................................................512 SetCategory (set error category) .....................................................................512 SetErrors (save the error state) ........................................................................513 SetFatality (set severity level for a particular error) ..........................................514 SetField (set the substitution value of the %Field macro) ................................515

18

ABC Library Reference SetFile (set the substitution value of the %File macro) ....................................516 SetKey (set the substitution value of the %Key macro) ...................................517 SetId (make a specific error current) ................................................................518 SetProcedureName ( stores procedure names) .............................................519 SubsString (resolves error message macros) ..................................................520 TakeBenign (process benign error) ..................................................................521 TakeError (process specified error) ..................................................................522 TakeFatal (process fatal error) .........................................................................523 TakeNotify (process notify error) ......................................................................524 TakeOther (process other error) .......................................................................525 TakeProgram (process program error) ............................................................526 TakeUser (process user error) .........................................................................527 Throw (process specified error) .......................................................................528 ThrowFile (set value of %File, then process error) ..........................................529 ThrowMessage (set value of %Message, then process error) .........................530 ViewHistory (initiates the view of the current errors) .......................................530

ErrorLogInterface

531

ErrorLogInterface Concepts ....................................................................................531 Relationship to Other Application Builder Classes .................................................531 ErrorLogInterface Source Files ...............................................................................531 ErrorLogInterface Methods .......................................................................................532 ErrorLogInterface Methods ...............................................................................532 Close (initiate close of log file) .........................................................................532 Open (method to initiate open of log file) ..........................................................533 Take (update the log file) .................................................................................533

FieldPairsClass

535

FieldPairsClass Overview .......................................................................................535 FieldPairsClass Properties........................................................................................538 List (recognized field pairs) ..............................................................................538 FieldPairsClass Methods ..........................................................................................539 FieldPairsClass Functional Organization--Expected Use ................................539 AddItem (add a field pair from one source field) .............................................540 AddPair (add a field pair:FieldPairsClass) .......................................................541 AssignLeftToRight (copy from "left" fields to "right" fields) ...............................543 AssignRightToLeft (copy from "right" fields to "left" fields) ...............................544 ClearLeft (clear each "left" field) .......................................................................545 ClearRight (clear each "right" field) ..................................................................546 Equal (return 1 if all pairs are equal) ................................................................547 EqualLeftRight (return 1 if all pairs are equal) ..................................................548 Init (initialize the FieldPairsClass object) ..........................................................548 Kill (shut down the FieldPairsClass object) ......................................................549

FileDropComboClass

551

Overview:FileDropComboClass ..............................................................................551

Contents and Forward

19

FileDropComboClass Properties ..............................................................................556 FileDropComboClass Properties ......................................................................556 AskProcedure (update procedure) ..................................................................556 ECOn (current state of entry completion) ........................................................556 EntryCompletion (automatic fill-ahead flag) .....................................................557 RemoveDuplicatesFlag (remove duplicate data) ............................................557 UseField (COMBO USE variable) ....................................................................558 FileDropComboClass Methods .................................................................................559 FileDropComboClass Methods ........................................................................559 FileDropComboClass Functional Organization--Expected Use .......................559 AddRecord (add a record filedrop queue) .......................................................561 Ask (add a record to the lookup file) .................................................................561 GetQueueMatch (locate a list item) ..................................................................562 Init (initialize the FileDropComboClass object) ................................................563 KeyValid (check for valid keystroke) ...............................................................565 Kill (shut down the FileDropComboClass object) ............................................565 ResetFromList (reset VIEW) ...........................................................................565 ResetQueue (refill the filedrop queue) .............................................................566 TakeAccepted (process accepted event) ........................................................567 TakeEvent (process the current ACCEPT loop event:FileDropComboClass) ...567 TakeNewSelection (process NewSelection events:FileDropComboClass) .......568 UniquePosition (check queue for duplicate record by key position) ...............569

FileDropClass

571

FileDropClass Overview .........................................................................................571 FileDropClass Properties ..........................................................................................576 FileDropClass Properties .................................................................................576 AllowReset (allow a reset) ...............................................................................576 DefaultFill (initial display value) ........................................................................576 InitSyncPair (initial list position) .......................................................................576 FileDropClass Methods.............................................................................................577 FileDropClass Methods ....................................................................................577 FileDropClass Functional Organization--Expected Use ...................................577 AddField (specify display fields) .......................................................................579 AddRecord (update filedrop queue) ................................................................580 AddUpdateField (specify field assignments) ....................................................580 Init (initialize the FileDropClass object) ............................................................581 Kill (shut down the FileDropClass object) ........................................................582 ResetQueue (fill filedrop queue) .......................................................................583 SetQueueRecord (copy data from file buffer to queue buffer:FileDropClass) .584 TakeAccepted (a virtual to accept data) ..........................................................584 TakeEvent (process the current ACCEPT loop event--FileDropClass) ...........585 TakeNewSelection (process EVENT:NewSelection events:FileDropClass) ....586 ValidateRecord (a virtual to validate records) ..................................................587

20

ABC Library Reference

FileManager

589

FileManager Overview ............................................................................................589 FileManager Properties.............................................................................................594 AliasedFile (the primary file) .............................................................................594 Buffer (the record buffer) ..................................................................................595 Buffers (saved record buffers) ..........................................................................595 Create (create file switch) .................................................................................596 Errors (the ErrorManager) ................................................................................596 File (the managed file) ......................................................................................596 FileName (variable filename) ...........................................................................597 FileNameValue (constant filename) .................................................................598 LazyOpen (delay file open until access) ...........................................................599 LockRecover (/RECOVER wait time parameter) .............................................599 OpenMode (file access/sharing mode) ............................................................600 SkipHeldRecords (HELD record switch) ..........................................................600 FileManager Methods ...............................................................................................601 Naming Conventions and Dual Approach to Database Operations .................601 FileManager Functional Organization--Expected Use .....................................602 AddField(track fields in a structure) ..................................................................604 AddKey (set the file's keys) ..............................................................................605 BindFields (bind fields when file is opened) .....................................................606 CancelAutoInc (undo PrimeAutoInc) ................................................................607 ClearKey (clear specified key components) .....................................................610 Close (close the file) .........................................................................................612 Deleted (return record status) .........................................................................613 DeleteRecord (delete a record) .......................................................................614 Destruct (automatic destructor) .......................................................................615 EqualBuffer (detect record buffer changes) .......................................................616 Fetch (get a specific record by key value) ........................................................617 GetComponents (return the number of key components) ................................618 GetEOF (return end of file status) ....................................................................619 GetError (return the current error ID) ...............................................................620 GetField (return a reference to a key component) ...........................................621 GetFieldName (return a key component field name) .......................................623 GetFields(get number of fields) .......................................................................625 GetFieldPicture(get field picture) .....................................................................625 GetFieldType(get field type) ............................................................................625 GetName (return the filename) .........................................................................626 Init (initialize the FileManager object) ...............................................................627 Insert (add a new record) .................................................................................629 KeyToOrder (return ORDER expression for a key) ..........................................630 Kill (shutdown the FileManager object) ............................................................632 Next (get next record in sequence) ..................................................................633 Open (open the file) ..........................................................................................634 Position (return the current record position) .....................................................635 PostDelete(trigger delete action post-processing) .............................................636

Contents and Forward

21

PostInsert(trigger insert action post-processing)................................................637 PostUpdate(trigger update action post-processing)...........................................638 PreDelete(trigger delete action pre-processing) ................................................639 PreInsert(trigger insert action pre-processing) ...................................................640 PreUpdate(trigger update action pre-processing) ..............................................642 Previous (get previous record in sequence) .....................................................644 PrimeAutoInc (prepare an autoincremented record for adding) .......................645 PrimeFields (a virtual to prime fields) ...............................................................647 PrimeRecord (prepare a record for adding:FileManager) ................................648 RestoreBuffer (restore a previously saved record buffer) ................................650 RestoreFile (restore a previously saved file state) ...........................................651 SaveBuffer (save a copy of the record buffer) .................................................652 SaveFile (save the current file state) ................................................................653 SetError (save the specified error and underlying error state) .........................654 SetErrors (set the error class used) ...................................................................655 SetKey (set current key) ...................................................................................656 SetName (set current filename) .........................................................................657 Throw (pass an error to the error handler for processing) ...............................659 ThrowMessage (pass an error and text to the error handler) ..........................660 TryFetch (try to get a specific record by key value) .........................................662 TryInsert (try to add a new record) ...................................................................663 TryNext (try to get next record in sequence) ....................................................664 TryOpen (try to open the file) ...........................................................................665 TryPrevious (try to get previous record in sequence) ......................................666 TryPrimeAutoInc (try to prepare an autoincremented record for adding) ........667 TryReget (try to get a specific record by position) ............................................669 TryUpdate (try to change the current record) ...................................................669 TryValidateField(validate field contents) .........................................................670 Update (change the current record) .................................................................671 UseFile (use LazyOpen file) .............................................................................672 ValidateField (validate a field) ..........................................................................674 ValidateFields (validate a range of fields) ........................................................675 ValidateFieldServer(validate field contents) ....................................................676 ValidateRecord (validate all fields) ...................................................................677

FilterLocatorClass

679

FilterLocatorClass Overview ...................................................................................679 FilterLocatorClass Properties....................................................................................683 FilterLocatorClass Properties ...........................................................................683 FloatRight ("contains" or "begins with" flag) .....................................................683 FilterLocatorClass Methods ......................................................................................684 FilterLocatorClass Methods ..............................................................................684 TakeAccepted (process an accepted locator value:FilterLocatorClass) ............684 UpdateWindow (apply the search criteria) .......................................................685

22

ABC Library Reference

FuzzyClass

687

FuzzyClass Overview .............................................................................................687 Relationship to Other Application Builder Classes .................................................687 FuzzyClass ABC Template Implementation ...........................................................687 FuzzyClass Source Files ........................................................................................687 FuzzyClass Properties ..............................................................................................688 FuzzyClass Methods.................................................................................................688 Construct (initialize FuzzyClass object) ..........................................................688 Init (initialize FuzzyClass object) .....................................................................688 Kill (shutdown FuzzyClass object) ...................................................................688 Match (find query matches) .............................................................................689 SetOption (set fuzzymatch options) ................................................................690

FormVCRClass

691

FormVCRClass Overview .........................................................................................691 FormVCRClass Concepts.........................................................................................691 FormVCRClass Relationship to Other Application Builder Classes .........................691 FormVCRClass ABC Template Implementation.......................................................691 FormVCRClass Source Files ....................................................................................692 FormVCRClass Properties........................................................................................692 QuickScan (buffered reads flag).........................................................................692 Toolbar (FormVCR Toolbar object) ....................................................................693 ToolbarItem (FormVCR ToolbarTarget object) ..................................................693 ViewPosition (store the current record position) ................................................694 FormVCRClass Methods: .........................................................................................695 AddToolbarTarget (set the FormVCR toolbar) ...................................................695 Init (initialize the FormVCR object).....................................................................696 InitSort (initialize locator values).........................................................................696 Kill (shut down the FormVCR object) .................................................................697 CheckBorders (check for existence of records) .................................................697 GetAction (return FormVCR action) ...................................................................698 GetActionAllowed (validate a requested FormVCR action) ...............................699 Next (get the next FormVCR item) .....................................................................700 Previous (get the previous FormVCR item) .......................................................701 ResetSort (apply sort order to FormVCR) ..........................................................701 SetAlerts (alert keystrokes for FormVCR controls) ............................................702 SetRequestControl (assign field equates to FormVCR actions) ........................702 SetVCRControls (assign field equates to FormVCR scrolling) ..........................703 SetSort (apply a sort order to the FormVCR group)...........................................704 TakeAcceptedLocator (apply an accepted FormVCR locator value) ............