VX-REXX Programmer's Guide
Publisher: Watcom
Published: 1995
Table of contents: title: Introduction.........................................................................................................................................................1; title: What you should know before starting....................................................................................................1; title: How to use this manual............................................................................................................................1; title: Organization......................................................................................................................................2; title: Syntax conventions............................................................................................................................3; title: Online information...................................................................................................................................4; title: Online books......................................................................................................................................4; title: REXX information............................................................................................................................4; title: Context help at design time...............................................................................................................4; title: Technical notes........................................................................................................................................5; title: Other sources of information...................................................................................................................5; title: Setting up.............................................................................................................................................................7; title: Before you start........................................................................................................................................7; title: Check your VX-REXX package.......................................................................................................7; title: Check your machine..........................................................................................................................7; title: Installing OS/2 REXX, the Enhanced Editor and the resource compiler..........................................8; title: Installing VX-REXX...............................................................................................................................9; title: Send in your registration card................................................................................................................10; title: Watcom VX-REXX folder contents (Standard Edition).......................................................................10; title: VX-REXX.......................................................................................................................................10; title: Read Me First..................................................................................................................................11; title: VX-REXX Programmer's Guide.....................................................................................................11; title: VX-REXX Reference......................................................................................................................11; title: REXX Information..........................................................................................................................11; title: Samples...........................................................................................................................................11; title: Projects............................................................................................................................................12; title: Macros.............................................................................................................................................12; title: Color Palette....................................................................................................................................12; title: Font Palette......................................................................................................................................12; title: Watcom VX-REXX folder contents (Client/Server Edition)................................................................12; title: Database Administrator...................................................................................................................13; title: Chart samples..................................................................................................................................13; title: Database samples............................................................................................................................13; title: Chart Object Guide..........................................................................................................................13; title: Database Objects Guide..................................................................................................................13; title: Watcom VX-REXX directory contents.................................................................................................13; title: Buildvrx.CMD.................................................................................................................................13; title: Buildcso.CMD (Client/Server Edition only)...................................................................................13; title: Bpatch.EXE.....................................................................................................................................14; title: Recover.EXE...................................................................................................................................14; title: A simple program.............................................................................................................................................15; title: Starting VX-REXX................................................................................................................................15; title: Creating an application..........................................................................................................................16; title: Creating the user interface.....................................................................................................................16; title: Customizing object properties...............................................................................................................20; title: A preliminary run...................................................................................................................................22; title: A simple program; title: Attaching code to objects.......................................................................................................................22; title: A test run................................................................................................................................................27; title: Improving the application......................................................................................................................28; title: Running the application.........................................................................................................................32; title: Saving the application............................................................................................................................33; title: Stopping VX-REXX..............................................................................................................................33; title: Creating and running projects........................................................................................................................35; title: Projects...................................................................................................................................................35; title: VX-REXX and the Workplace Shell.....................................................................................................36; title: Creating a project...................................................................................................................................36; title: Opening an existing project...................................................................................................................36; title: Saving a project......................................................................................................................................36; title: Running a project...................................................................................................................................37; title: Making an executable............................................................................................................................37; title: Command line options...........................................................................................................................37; title: Adding objects to a window.............................................................................................................................39; title: Introduction to objects...........................................................................................................................39; title: Creating objects.....................................................................................................................................39; title: Using the tool palette.............................................................................................................................41; title: Sizing and moving an object..................................................................................................................42; title: Selecting objects....................................................................................................................................43; title: Copying and deleting objects.................................................................................................................43; title: Duplicating an object.............................................................................................................................45; title: Aligning objects.....................................................................................................................................45; title: Grouping objects....................................................................................................................................46; title: Moving objects to the front and back....................................................................................................47; title: Changing object properties..............................................................................................................................49; title: Property notebook..................................................................................................................................49; title: Changing property values......................................................................................................................50; title: Properties of copied and deleted objects................................................................................................53; title: Direct editing.........................................................................................................................................53; title: Adding and modifying routines.......................................................................................................................55; title: Introduction to routines..........................................................................................................................55; title: Event routines..................................................................................................................................55; title: General routines..............................................................................................................................55; title: Introduction to sections..........................................................................................................................55; title: Editing sections......................................................................................................................................56; title: Editing event routine sections.........................................................................................................56; title: Event routine names........................................................................................................................57; title: General routines..............................................................................................................................57; title: Using the section list.......................................................................................................................57; title: Creating a new section....................................................................................................................57; title: Default section header.....................................................................................................................58; title: Adding and modifying routines; title: Editing a section..............................................................................................................................58; title: Deleting a section............................................................................................................................59; title: Using the section editor.........................................................................................................................59; title: Searching.........................................................................................................................................59; title: Replacing.........................................................................................................................................59; title: Moving to a line..............................................................................................................................60; title: Accessing online information..........................................................................................................61; title: Jumping to another routine..............................................................................................................61; title: Using an external editor.........................................................................................................................61; title: Event routines of copied or deleted objects...........................................................................................62; title: Sharing sections.....................................................................................................................................63; title: Adding shared sections....................................................................................................................63; title: Editing shared sections....................................................................................................................63; title: Deleting shared sections..................................................................................................................63; title: Search order.....................................................................................................................................63; title: Programming with objects...............................................................................................................................65; title: The structure of a VX-REXX project....................................................................................................65; title: Code files.........................................................................................................................................65; title: Window files...................................................................................................................................65; title: Predefined routines..........................................................................................................................66; title: Multiple files and windows.............................................................................................................67; title: Interacting with objects from a program................................................................................................67; title: Referring to an object......................................................................................................................67; title: Renaming an object.........................................................................................................................68; title: Implicit and relative naming............................................................................................................69; title: Responding to events.......................................................................................................................70; title: Getting and setting properties..........................................................................................................71; title: Using object methods......................................................................................................................72; title: Using objects......................................................................................................................................................73; title: Common operations on objects..............................................................................................................73; title: Disabling objects.............................................................................................................................73; title: Hiding objects..................................................................................................................................73; title: Getting and setting the focus...........................................................................................................73; title: Input validation................................................................................................................................74; title: Setting the tab order........................................................................................................................74; title: Windows................................................................................................................................................74; title: Setting the border type....................................................................................................................75; title: Setting the caption...........................................................................................................................75; title: Adding minimize, hide, and maximize buttons...............................................................................75; title: Removing the system menu............................................................................................................76; title: Removing the title bar.....................................................................................................................76; title: Resizing objects in windows...........................................................................................................76; title: Getting and setting the window state..............................................................................................76; title: Setting the OS/2 window list title....................................................................................................76; title: Hints................................................................................................................................................76; title: Using objects; title: Displaying a background picture.....................................................................................................77; title: Push buttons...........................................................................................................................................77; title: Setting the caption...........................................................................................................................77; title: Creating a default button.................................................................................................................77; title: Creating a cancel button..................................................................................................................77; title: Using the Click event......................................................................................................................77; title: Radio buttons.........................................................................................................................................78; title: Setting the caption...........................................................................................................................78; title: Setting and getting the button state.................................................................................................78; title: Using the Click event......................................................................................................................79; title: Check boxes...........................................................................................................................................79; title: Setting the caption...........................................................................................................................79; title: Setting and clearing a check box.....................................................................................................80; title: Using the Click event......................................................................................................................80; title: Descriptive text......................................................................................................................................80; title: Setting the text.................................................................................................................................80; title: Entry field..............................................................................................................................................80; title: Setting and getting the value...........................................................................................................81; title: Masking the value...........................................................................................................................81; title: Write-protecting an entry field........................................................................................................81; title: Using cut, copy, and paste and delete.............................................................................................81; title: Using default and cancel push buttons............................................................................................82; title: Multi line entry field..............................................................................................................................82; title: Adding text to an MLE....................................................................................................................82; title: Using scroll bars and word wrap.....................................................................................................83; title: Write-protecting an MLE................................................................................................................83; title: Using cut, copy, and paste and delete.............................................................................................83; title: Using MLEs with a cancel button...................................................................................................84; title: Lists........................................................................................................................................................84; title: Setting the sort order.......................................................................................................................84; title: Adding items to the list...................................................................................................................85; title: Selecting and deselecting list items.................................................................................................85; title: Removing list items.........................................................................................................................86; title: Write-protecting drop down combo boxes......................................................................................86; title: Per-item data....................................................................................................................................86; title: Sizing drop down combo boxes......................................................................................................86; title: Using the Click event......................................................................................................................86; title: Using the Change event...................................................................................................................86; title: Using the DoubleClick event..........................................................................................................87; title: Using lists with default and cancel push buttons............................................................................87; title: Spin buttons...........................................................................................................................................87; title: Using spin buttons with numbers....................................................................................................87; title: Using spin buttons with a list of items............................................................................................87; title: Using the ReadOnly and NumericOnly properties..........................................................................88; title: Using default and cancel push buttons............................................................................................88; title: Pictures...................................................................................................................................................88; title: Setting the picture path....................................................................................................................89; title: Using objects; title: Creating 3-D effects........................................................................................................................89; title: Groups....................................................................................................................................................89; title: Setting a group box caption.............................................................................................................90; title: Adding objects to a group...............................................................................................................90; title: Removing objects from a group......................................................................................................90; title: Disabling objects in a group............................................................................................................90; title: Notebooks..............................................................................................................................................90; title: Changing the notebook binding......................................................................................................92; title: Changing the tab shape....................................................................................................................92; title: Using the MajorTabPos and BackPages properties........................................................................92; title: Adding pages at design time...........................................................................................................93; title: Setting the page tab text..................................................................................................................94; title: Setting the page status text..............................................................................................................94; title: Turning to a given page...................................................................................................................94; title: Adding pages at run time.................................................................................................................94; title: Preloading notebook pages..............................................................................................................95; title: Loading pages under program control.............................................................................................95; title: Removing pages at run time............................................................................................................95; title: Containers..............................................................................................................................................95; title: Setting the view...............................................................................................................................96; title: Creating detail view fields...............................................................................................................99; title: Record emphasis............................................................................................................................100; title: Adding records..............................................................................................................................101; title: Removing records..........................................................................................................................102; title: Selecting records...........................................................................................................................102; title: Setting detail view information.....................................................................................................102; title: Making fields invisible..................................................................................................................103; title: Positioning records........................................................................................................................103; title: Sorting records..............................................................................................................................103; title: Searching records..........................................................................................................................104; title: Sharing records between multiple containers................................................................................104; title: Moving a record from one container to another............................................................................104; title: Direct editing of records................................................................................................................105; title: Checking if a record is in a container............................................................................................105; title: Using the container ContextMenu event.......................................................................................106; title: Dragging and dropping records.....................................................................................................106; title: Interacting with the Workplace Shell............................................................................................110; title: Programming with the DragStart event.........................................................................................113; title: Sliders..................................................................................................................................................114; title: Setting up the slider ticks..............................................................................................................115; title: Setting and getting the slider value...............................................................................................115; title: Using a slider as a progress indicator............................................................................................115; title: Responding to the Track event......................................................................................................115; title: Value sets.............................................................................................................................................115; title: Setting the number of rows and columns......................................................................................116; title: Setting item types..........................................................................................................................116; title: Setting item values........................................................................................................................116; title: Using objects Handling the Click event...............................................................................................................116; title: Timers..................................................................................................................................................116; title: Setting the delay interval...............................................................................................................116; title: Starting and stopping timers..........................................................................................................116; title: Responding to................................................................................................................................117; title: Dynamic Data Exchange (DDE) Client...............................................................................................117; title: The VX-REXX console.......................................................................................................................117; title: Turning off the console.................................................................................................................117; title: Hiding, moving and clearing the console......................................................................................118; title: Removing the console from the OS/2 window list........................................................................118; title: Console input.................................................................................................................................119; title: Bitmaps, icons, and resources........................................................................................................................121; title: Loading bitmap and icon files..............................................................................................................121; title: System icons and pointers....................................................................................................................121; title: Loading bitmap and icon resources.....................................................................................................122; title: Adding resources to your project.........................................................................................................123; title: Using the resource editor...............................................................................................................123; title: Resource binding...........................................................................................................................124; title: Editing bitmaps and icons.............................................................................................................124; title: A note about icon formats.............................................................................................................125; title: The executable icon.......................................................................................................................125; title: Drag and drop operations..............................................................................................................................127; title: Drag and drop definitions....................................................................................................................127; title: Basic terminology..........................................................................................................................127; title: Adding drag targets to your project.....................................................................................................127; title: Files, records and objects..............................................................................................................128; title: Default and supported operations..................................................................................................128; title: Other formats.................................................................................................................................128; title: Passing the drop to the parent object.............................................................................................129; title: Container restrictions....................................................................................................................130; title: Handling drops.....................................................................................................................................130; title: Programming with the DragDrop event........................................................................................130; title: Programming with the MoveRecord event...................................................................................131; title: Adding drag sources to your project....................................................................................................131; title: The StartDrag method...................................................................................................................131; title: Dragging objects............................................................................................................................131; title: Dragging files................................................................................................................................132; title: Dragging to the shredder and printer.............................................................................................132; title: Adding menus to a program..........................................................................................................................135; title: Types of menus....................................................................................................................................135; title: Menu bar and pull-down menus....................................................................................................135; title: Pop-up or context menus...............................................................................................................136; title: Cascaded menus............................................................................................................................136; title: Menu properties...................................................................................................................................137; title: Adding menus to a program Menu editor..........................................................................................................................................138; title: Creating a menu...................................................................................................................................139; title: Adding code to menu items.................................................................................................................142; title: Creating a pop-up menu.......................................................................................................................143; title: Responding to a pop-up menu.............................................................................................................143; title: Using pop-up menus with containers...................................................................................................144; title: Creating a conditional cascaded menu.................................................................................................146; title: Changing menus at run time................................................................................................................146; title: Checking menu items....................................................................................................................146; title: Installing accelerators at run time.................................................................................................147; title: Using built-in dialogs and system functions.................................................................................................149; title: Predefined dialogs................................................................................................................................149; title: File selection dialog.......................................................................................................................149; title: Font selection dialog.....................................................................................................................151; title: Message dialog..............................................................................................................................152; title: Multiline message dialog...............................................................................................................153; title: Prompt dialog................................................................................................................................154; title: INI files................................................................................................................................................155; title: File system manipulation.....................................................................................................................155; title: Creating custom dialogs.................................................................................................................................157; title: Calling the modal window file.............................................................................................................157; title: Creating a new window file.................................................................................................................158; title: Returning a value.................................................................................................................................158; title: Running the program...........................................................................................................................160; title: Multiple file considerations.................................................................................................................160; title: Secondary windows.........................................................................................................................................161; title: Primary vs. secondary..........................................................................................................................161; title: Window list window............................................................................................................................161; title: Creating and editing a secondary window...........................................................................................162; title: Opening a secondary window at run time............................................................................................163; title: Closing a secondary window at run time.............................................................................................164; title: Saving a multiple window file.............................................................................................................164; title: Deleting a window...............................................................................................................................165; title: Multiple file projects.......................................................................................................................................167; title: Overview..............................................................................................................................................167; title: File list window...................................................................................................................................167; title: Creating and editing a new file............................................................................................................168; title: Calling a file.........................................................................................................................................169; title: Calling a code file..........................................................................................................................169; title: Calling a window file....................................................................................................................170; title: Returning a value.................................................................................................................................171; title: Returning multiple values.............................................................................................................171; title: Saving files..........................................................................................................................................172; title: Multiple file projects Saving one file...............................................................................................................................172; title: Removing or adding a file....................................................................................................................173; title: Saving a file as text..............................................................................................................................173; title: Loading a file.......................................................................................................................................173; title: Adding help to a program..............................................................................................................................175; title: Using IPF help files.............................................................................................................................175; title: Setting the file and title.................................................................................................................175; title: Help tags........................................................................................................................................175; title: Notes on IPF tags..........................................................................................................................176; title: Using text files for help........................................................................................................................176; title: Invoking help directly..........................................................................................................................177; title: Custom help.........................................................................................................................................178; title: Debugging a project........................................................................................................................................181; title: Run time program exceptions..............................................................................................................181; title: The interactive debugger......................................................................................................................182; title: Debugger windows........................................................................................................................182; title: Starting the debugger.....................................................................................................................184; title: Viewing REXX instructions..........................................................................................................184; title: Using breakpoints..........................................................................................................................184; title: Tracing a program.........................................................................................................................186; title: Displaying and modifying variables..............................................................................................186; title: Interrupting a program...................................................................................................................187; title: Executing a REXX instruction......................................................................................................187; title: Run time exception handling in the debugger...............................................................................188; title: Quitting the debugger....................................................................................................................188; title: Debugging with the say and trace instructions....................................................................................188; title: Extending VX-REXX......................................................................................................................................191; title: Object libraries.....................................................................................................................................191; title: Function libraries.................................................................................................................................191; title: Using databases with VX-REXX...................................................................................................................193; title: Overview..............................................................................................................................................193; title: Registering routines.............................................................................................................................194; title: Starting the database manager.............................................................................................................195; title: Connecting to the database..................................................................................................................195; title: Database API return codes...................................................................................................................196; title: Preparing the SELECT statement........................................................................................................196; title: Declaring a cursor................................................................................................................................197; title: Retrieving the data...............................................................................................................................197; title: Displaying results................................................................................................................................198; title: Closing the cursor................................................................................................................................198; title: Stopping the database manager............................................................................................................199; title: Where to go from here.........................................................................................................................199; title: Writing multithreaded applications..............................................................................................................201; title: Planning your application....................................................................................................................201; title: Starting a code file thread....................................................................................................................201; title: Starting a window file as a thread........................................................................................................202; title: Communicating with a thread..............................................................................................................202; title: Getting information about running threads..........................................................................................204; title: Halting a thread....................................................................................................................................204; title: Controlling other programs...........................................................................................................................205; title: Running programs and executing OS/2 commands.............................................................................205; title: The address instruction..................................................................................................................205; title: SysCreateObject and SysSetObjectData.......................................................................................205; title: Running commands that require OS/2 session VIO support.........................................................206; title: Redirecting standard input, output and error.................................................................................206; title: Manipulating windows........................................................................................................................207; title: Finding a window..........................................................................................................................207; title: Setting window properties.............................................................................................................207; title: Getting window properties............................................................................................................208; title: Window methods...........................................................................................................................209; title: Example programs.........................................................................................................................209; title: Sending keystrokes..............................................................................................................................209; title: Keystroke syntax...........................................................................................................................210; title: Controlling other applications.......................................................................................................211; title: Controlling a MultiLineEntryField...............................................................................................211; title: DOS and OS/2 Windows...............................................................................................................212; title: Dynamic Data Exchange (DDE) client................................................................................................214; title: Creating a DDE client...................................................................................................................214; title: Initiating a conversation................................................................................................................214; title: Executing server commands..........................................................................................................215; title: Requesting data.............................................................................................................................215; title: Sending data..................................................................................................................................216; title: Getting the status of a conversation..............................................................................................216; title: Terminating a conversation...........................................................................................................216; title: Application macros..............................................................................................................................216; title: Creating application macros with VX-REXX...............................................................................217; title: Using application macro examples................................................................................................217; title: Creating objects at run time..........................................................................................................................221; title: Using VRCreate and VRCreateStem...................................................................................................221; title: Setting properties at creation time.......................................................................................................222; title: Attaching events to an object...............................................................................................................222; title: Events and event queues......................................................................................................................222; title: Destroying objects...............................................................................................................................223; title: VX-REXX design time macros......................................................................................................................225; title: The PROFILE.VRM file......................................................................................................................225; title: Search order.........................................................................................................................................225; title: Installing macros..................................................................................................................................225; title: VX-REXX design time macros; title: Macro arguments.................................................................................................................................226; title: Functions and methods........................................................................................................................226; title: Distributing your projects..............................................................................................................................227; title: Run time library...................................................................................................................................227; title: Additional redistribution rights............................................................................................................227; title: Samples............................................................................................................................................................229; title: Bounce.................................................................................................................................................229; title: Button...................................................................................................................................................229; title: Calculator.............................................................................................................................................229; title: DDE Explorer......................................................................................................................................230; title: DragDrop.............................................................................................................................................230; title: Employee database...............................................................................................................................230; title: File browser.........................................................................................................................................230; title: Hint and Help.......................................................................................................................................230; title: Mind Game..........................................................................................................................................231; title: MMW...................................................................................................................................................231; title: Movies.................................................................................................................................................231; title: Notebook..............................................................................................................................................232; title: Popup...................................................................................................................................................232; title: Printing.................................................................................................................................................232; title: RGB.....................................................................................................................................................232; title: Scan......................................................................................................................................................232; title: Threads.................................................................................................................................................233; title: Window Controller..............................................................................................................................234