Appendix
Apostrophe Operator
 
Formats 1. Assign Property: object'property[$]=var[$]
2. Retrieve Property: var[$]=object'property[$]
3. Call a Method: var[$]=object'method[$](args)
4. List of Available Properties or Methods: var$=object'*
Where
 
  ' Apostrophe Operator (sometimes called a tick)
  * Asterisk to produce a comma-separated list of properties/methods available for a particular object; e.g., to list DROP_BOX properties
  (assuming dboxis a unique ctl_id):
  PRINT dbox'* Auto,BackColour,Col,Cols,CurrentItem,CtlName,Enabled
  ,Eom,Focus,Font,Height,hWnd,Item,ItemCount,ItemText, Key,Left,Line,Lines,Msg,OnFocusCtl,Parent,Sep,SepLoa d,Tbl,TextColour,Tip,Top,Value,Visible,Width,
  args Optional argument(s).
  method[$] Name of a valid method/function in the given control/object. Method names are not case-sensitive. To query the list of available methods, use the syntax for asterisk '* described above
  object Numeric variable containing the control value (handle) for the object.
  property[$] Name of a valid property in the given control/object. Property names are not case-sensitive. To query the list of available properties, use the syntax for asterisk '* described above.
var[$] String or numeric variable.


*Note* In the above syntax, ensure that numeric methods/properties correspond to numeric variables and that string methods/properties correspond to string variables; i.e., object'property$=var$ or var=object'method( ) on both sides of the equation.


 
Description An apostrophe operator (tick) allows dynamic access to the properties and methods available for a given COM, OOP, or graphical object. While the syntax is generally the same for all object-oriented coding in ProvideX, the apostrophe operator can be used to read and alter properties, or execute methods, in a variety of different control and object types.
For detailed information on the use of the apostrophe operator for specific application development purposes, refer to the following sources:
 
• ProvideX Event Handling documentation, Automation in ProvideX.
 
ProvideX NOMADS Reference and related Direxions presentations.
 
Control Object Properties, .
 
Object Oriented Programming.
 
Examples The first example creates a multi-line control, displays the properties available, changes the column width, and returns the current screen coordinates.
->multi_line 100,@(10,12,40,1)
->LET X=100
->PRINT X'* Auto,BackColour,Col,Cols,CtlName,Enabled,Eom,Fmt,Focus,Font,Height,hWnd, ImpliedDecimal,Key,Left,Len,Line,Lines,Lock,MenuCtl,Msg,Nul,OnFocusCtl, Parent,Scroll,SelectLength,SelectOffset,SelectText,Sep,SignalOnExit, TextColour,Tip,Top,Uppercase,Value,Visible,Width,
->LET X'Cols=50 ! Make control 50 columns wide
->PRINT X'Col,X'Line ! Current screen coordinates of the multi-line
10 12
->
 
The following example creates a grid containing 10 columns and 5 rows, then selects column two, row zero (which selects the entire column). Changing the value of the property sets the contents of all the selected cells to that value.
->GRID 10,@(10,10,40,5)
->Y=10
->Y'ColumnsWide=10
->Y'RowsHigh=5
->Y'Column=2
->Y'Row=0
->Y'Value$="New Data"
 
This dynamically changes a property in one object based on the value of another:
IF Country.ctl’alue$ = "CDN" \ THEN Zip'Fmt$="A0A 0A0" \ ELSE Zip'Fmt$="00000"
 
The following is a simple COM interface example that instantiates an Internet
Explorer object, then displays the PVX website:
DEF OBJECT IE, @(10,10,40,20)="Shell.Explorer" IE’Navigate2('www.pvx.com')
 
The following OOP example assumes the definition of a "Customer" object:
 
Cst= NEW ("Customer") Cst’Find("012345")