ebook img

OpenEdge Development: ABL Handbook - Progress Community PDF

838 Pages·2008·8.32 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview OpenEdge Development: ABL Handbook - Progress Community

OpenEdge Development: ® ABL Handbook John Sadd Expert Series © 2008 Progress Software Corporation. All rights reserved. Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation. This manual is also copyrighted and all rights are reserved. This manual may not, in whole or in part, be copied, photocopied, translated, or reduced to any electronic medium or machine-readable form without prior consent, in writing, from Progress Software Corporation. The information in this manual is subject to change without notice, and Progress Software Corporation assumes no responsibility for any errors that may appear in this document. The references in this manual to specific platforms supported are subject to change. A (and design), Actional, Actional (and design), Affinities Server, Allegrix, Allegrix (and design), Apama, Business Empowerment, ClientBuilder, ClientSoft, ClientSoft (and Design), Clientsoft.com, DataDirect (and design), DataDirect Connect, DataDirect Connect64, DataDirect Connect OLE DB, DataDirect Technologies, DataDirect XQuery, DataXtend, Dynamic Routing Architecture, EasyAsk, EdgeXtend, Empowerment Center, eXcelon, Fathom, IntelliStream, Neon, Neon New Era of Networks, O (and design), ObjectStore, OpenEdge, PDF, PeerDirect, Persistence, Persistence (and design), POSSENET, Powered by Progress, PowerTier, ProCare, Progress, Progress DataXtend, Progress Dynamics, Progress Business Empowerment, Progress Empowerment Center, Progress Empowerment Program, Progress Fast Track, Progress OpenEdge, Progress Profiles, Progress Results, Progress Software Developers Network, ProVision, PS Select, SequeLink, Shadow, ShadowDirect, Shadow Interface, Shadow Web Interface, ShadowWeb Server, Shadow TLS, SOAPStation, Sonic ESB, SonicMQ, Sonic Orchestration Server, Sonic Software (and design), SonicSynergy, SpeedScript, Stylus Studio, Technical Empowerment, Voice of Experience, WebSpeed, and Your Software, Our Technology– Experience the Connection are registered trademarks of Progress Software Corporation or one of its subsidiaries or affiliates in the U.S. and/or other countries. AccelEvent, Apama Dashboard Studio, Apama Event Manager, Apama Event Modeler, Apama Event Store, AppsAlive, AppServer, ASPen, ASP-in-a-Box, BusinessEdge, Cache-Forward, DataDirect Spy, DataDirect SupportLink, DataDirect XML Converters, Future Proof, Ghost Agents, GVAC, Looking Glass, ObjectCache, ObjectStore Inspector, ObjectStore Performance Expert, Pantero, POSSE, ProDataSet, Progress ESP Event Manager, Progress ESP Event Modeler, Progress Event Engine, Progress RFID, PSE Pro, SectorAlliance, SmartBrowser, SmartComponent, SmartDataBrowser, SmartDataObjects, SmartDataView, SmartDialog, SmartFolder, SmartFrame, SmartObjects, SmartPanel, SmartQuery, SmartViewer, SmartWindow, Sonic, Sonic Business Integration Suite, Sonic Process Manager, Sonic Collaboration Server, Sonic Continuous Availability Architecture, Sonic Database Service, Sonic Workbench, Sonic XML Server, The Brains Behind BAM, WebClient, and Who Makes Progress are trademarks or service marks of Progress Software Corporation or one of its subsidiaries or affiliates in the U.S. and other countries. Vermont Views is a registered trademark of Vermont Creative Software in the U.S. and other countries. IBM is a registered trademark of IBM Corporation. JMX and JMX-based marks and Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Any other trademarks or service marks contained herein are the property of their respective owners. Third party acknowledgements — See the “Third party acknowledgements” section on pagePreface–13. February 2008 Last updated with new content: Release 10.1C Item Number: 116164; Product Code: 2251; R10.1C ISBN: 0-923562-06-0 (10 digit); 978-0-923562-06-9 (13 digit) For the latest documentation updates see the OpenEdge Product Documentation category on PSDN (http://www.psdn.com/ library/kbcategory.jspa?categoryID=129). Acknowledgements I'd like to thank all my colleagues who have reviewed this book and given valuable comments to add clarity to the text and also to point out where I had missed important information. My thanks also go to the OpenEdge® development, quality assurance, and documentation teams who have worked hard to provide me with invaluable assistance throughout the writing of this book. Acknowledgements Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preface–1 1. Introducing ABL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1 About the sample database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2 Getting started with ABL—the ABL snowplow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3 In the beginning…FOR EACH CUSTOMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5 Starting your OpenEdge session. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6 Writing your first procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10 Basic characteristics of ABL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–14 ABL is procedural . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–14 ABL is block-structured . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–14 An ABL procedure consists of statements. . . . . . . . . . . . . . . . . . . . . . . . 1–14 ABL combines procedural, database, and user interface statements. . . 1–15 Saving your test procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17 2. Using Basic ABL Constructs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1 Refining the data selection with a WHERE clause . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Comparison operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–3 Using quotation marks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4 Creating nested blocks to display related data . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5 Changing labels and formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9 Using program variables and data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10 Defining formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–12 Other variable qualifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–13 Variable naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14 Placement of variable definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15 Contents Defining an IF-THEN-ELSE decision point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–16 Using the ABL Unknown value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–16 Using built-In ABL functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–17 ABL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–21 Putting a calculation into your procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25 Arithmetic expressions and operands . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25 Arithmetic built-in functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28 Using the Intelligent Edit Control and its shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . 2–30 Getting to online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34 Saving and compiling your test procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37 3. Running ABL Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–1 Running a subprocedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2 Using the Propath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3 Using external and internal procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–8 Writing internal procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9 Assigning a value to a variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–10 When to use internal and external procedures. . . . . . . . . . . . . . . . . . . . . 3–12 Adding comments to your procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13 4. Introducing the OpenEdge AppBuilder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–1 Starting the AppBuilder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2 Creating a new procedure and window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4 Adding fields to your window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5 Changing object names and titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–7 Saving a procedure from the AppBuilder. . . . . . . . . . . . . . . . . . . . . . . . . 4–8 Running your procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9 Using the Query Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–10 Adding a browse to your window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13 Using property sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–16 Using the Section Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–18 Looking at preprocessor values in the Code Preview . . . . . . . . . . . . . . . 4–20 Adding buttons to your window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–24 Defining a CHOOSE trigger for your button. . . . . . . . . . . . . . . . . . . . . . . 4–25 Defining user interface events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–27 Adjusting the layout of the buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–30 Contents–2 Contents 5. Examining the Code the AppBuilder Generates. . . . . . . . . . . . . . . . . . . . . . . . 5–1 Viewing the entire sample procedure code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2 The Definitions section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3 Window, button, browse, and frame definitions . . . . . . . . . . . . . . . . . . . 5–4 Creating the window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8 Defining triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11 Triggers as event-driven code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–12 Looking at the main block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–13 The internal procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–17 Contrasting procedural and event-driven programs . . . . . . . . . . . . . . . . . . . . . . . 5–18 Advantages of the AppBuilder file format . . . . . . . . . . . . . . . . . . . . . . . . 5–21 Looking ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–23 Reusable components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–23 User interface independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–23 Distributed applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–24 Dynamic programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–24 6. Procedure Blocks and Data Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–1 Blocks and block properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3 Procedure block scoping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–4 Language statements that define blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7 DO blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7 FOR blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15 REPEAT blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–25 Data access without looping—the FIND statement. . . . . . . . . . . . . . . . . 6–27 7. Record Buffers and Record Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–1 Record buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2 Record scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–6 Generating a procedure listing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–8 Adding procedures to the test window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–18 Defining h-OrderCalcs.p to calculate totals. . . . . . . . . . . . . . . . . . . . . . . 7–18 Writing the BinCheck procedure to check inventory. . . . . . . . . . . . . . . . 7–25 Displaying the new fields in the window . . . . . . . . . . . . . . . . . . . . . . . . . 7–35 8. Defining Graphical Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–1 Types of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2 Defining static objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–4 Using the VIEW-AS phrase for data representation objects. . . . . . . . . . 8–4 Defining objects that don’t represent data values. . . . . . . . . . . . . . . . . . 8–6 Using and setting object attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–7 Changing attribute values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–8 Common attribute values for visual objects . . . . . . . . . . . . . . . . . . . . . . 8–10 Invoking object methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17 Contents–3 Contents Instantiating and realizing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Instantiating objects in a container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Realizing and derealizing objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–23 Using object events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–24 User interface events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–24 Defining triggers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–27 Applying events in your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–34 9. Using Graphical Objects in Your Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–1 Using data representation objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2 Modifying fill-in attributes in the Properties Window. . . . . . . . . . . . . . . . . 9–2 Changing a fill-in field to an editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4 Adding a toggle box to the window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–9 Defining a slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–11 Objects that display a list of choices for a data value. . . . . . . . . . . . . . . . 9–14 Using a radio set to display a set of choices for a value . . . . . . . . . . . . . 9–15 Using other types of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–19 Using rectangles to organize objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–19 Using images to display pictures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–20 Adding text to the window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–23 Specifying drag and drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26 Using menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–27 Menu bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–27 Defining a menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28 Assigning a menu bar to a window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30 Defining a menu bar for the sample window . . . . . . . . . . . . . . . . . . . . . . 9–30 Defining a pop-up menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–40 Character-mode considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–42 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–44 10. Using Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–1 Why you use queries in your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–2 Queries versus block-oriented data access. . . . . . . . . . . . . . . . . . . . . . . 10–2 Using queries to share data between procedures . . . . . . . . . . . . . . . . . . 10–4 Using queries to populate a browse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–4 Defining and using queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–5 OPEN and CLOSE QUERY statements. . . . . . . . . . . . . . . . . . . . . . . . . . 10–5 GET statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–8 Closing a query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–10 Determining the current number of rows in a query . . . . . . . . . . . . . . . . 10–11 Identifying the current row in the query . . . . . . . . . . . . . . . . . . . . . . . . . . 10–16 Repositioning a query. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–19 Extending the sample window to use the queries . . . . . . . . . . . . . . . . . . 10–23 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–28 Contents–4 Contents 11. Defining and Using Temp-tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–1 Using temp-tables in your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–2 ABL DataSets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–3 ABL work-tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–3 The temporary database for temp-tables . . . . . . . . . . . . . . . . . . . . . . . . 11–4 Defining a temp-table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–4 Using a temp-table to summarize data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–10 Using a temp-table as a parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–14 Temp-table parameter syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–14 Passing a temp-table by value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–16 Passing a temp-table by reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–16 Passing a temp-table parameter by binding . . . . . . . . . . . . . . . . . . . . . . 11–17 Defining a procedure to return Order Lines. . . . . . . . . . . . . . . . . . . . . . . 11–20 Using BUFFER-COPY to assign multiple fields . . . . . . . . . . . . . . . . . . . 11–21 Using include files to duplicate code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–22 Adding an Order Line browse to the Customer window . . . . . . . . . . . . . . . . . . . . 11–24 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11–29 12. Using the Browse Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–1 Defining a query for a browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–3 Planning for the size of the result set . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–3 Defining a browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–4 Changing the test window for the OrderLine browse . . . . . . . . . . . . . . . 12–6 Enabling columns in the browse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–9 Defining a single- or multiple-select browse . . . . . . . . . . . . . . . . . . . . . . 12–11 Browse selection and query interaction . . . . . . . . . . . . . . . . . . . . . . . . . 12–14 Using calculated columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–15 Sizing a browse and browse columns. . . . . . . . . . . . . . . . . . . . . . . . . . . 12–17 Specifying a widget type for displaying column data. . . . . . . . . . . . . . . . 12–18 Programming with the browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–21 Browse events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–21 Manipulating rows in the browse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–27 Manipulating the browse itself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–36 Browse style options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–42 Resizable browse objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–47 Resizing the browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–47 Moving the browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–48 Resizing the browse column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–48 Moving the browse column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–49 Changing the row height of the browse. . . . . . . . . . . . . . . . . . . . . . . . . . 12–49 Additional attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–49 User manipulation events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–50 Contents–5 Contents Using browse objects in character interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–51 Character browse modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–51 Control keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–52 Functional differences from the Windows graphical browse . . . . . . . . . . 12–55 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12–57 13. Advanced Use of Procedures in ABL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–1 RETURN statement and RETURN-VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–2 Using persistent procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–3 Running a procedure PERSISTENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–5 Using a persistent procedure as a run-time library . . . . . . . . . . . . . . . . . 13–9 Useful procedure attributes and methods . . . . . . . . . . . . . . . . . . . . . . . . 13–13 Using a persistent procedure as shared code . . . . . . . . . . . . . . . . . . . . . 13–17 Using a persistent procedure to duplicate code. . . . . . . . . . . . . . . . . . . . 13–18 Deleting persistent procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–22 Examples: Communicating between persistent procedures . . . . . . . . . . 13–27 Shared and global objects in ABL procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–32 Why you generally shouldn’t use shared objects. . . . . . . . . . . . . . . . . . . 13–34 Global shared objects in ABL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13–36 14. Defining Functions and Building Super Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–1 User-defined functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–2 Defining a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–3 Making a forward declaration for a function. . . . . . . . . . . . . . . . . . . . . . . 14–4 Using the AppBuilder to generate function definitions . . . . . . . . . . . . . . . 14–8 Making run-time references with DYNAMIC-FUNCTION. . . . . . . . . . . . . 14–11 Using super procedures in your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–13 Super procedure language syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–13 Super procedure guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–17 Using session super procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–29 Super procedure example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–30 PUBLISH and SUBSCRIBE statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–36 Subscribing to an event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–36 Publishing an event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–38 Passing parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–38 Canceling a subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–39 PUBLISH/SUBSCRIBE example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–40 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14–43 Contents–6

Description:
The references in this manual to specific platforms supported are subject to Progress Empowerment Program, Progress Fast Track, Progress OpenEdge,
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.