Objects
Description
Xbasic functions and events for working with objects in Desktop applications. Includes information about types, working with address and lookup tables, etc.
- Name
- Description
- Object Addresses
Each object has an address that you use to manipulate the object. An object address is much like a real address. Just as "36 Bigelow St., Cambridge, MA02139" uniquely identifies someone's home, an object address uniquely identifies an object. System objects are top-level objects. They can be addressed directly by just specifying the object name. You can optionally prefix the object name with a colon to avoid any potential ambiguity if a user created object has the same name as a system object.
- Object Events
Many events are triggered by objects, such as buttons, fields, and forms. The object events are generally triggered in response to the cursors movements into and out of the object (i.e., the changing of focus from one place to another).
- Object Names
An object name must be alphanumeric, can contain ?_', must start with a letter, and must be unique in its container. For example, if a form has two buttons, the buttons must have different names. But if you have two different forms, the buttons on each form can have the same name. Alpha Anywhere will automatically fix object names that break these rules. For example if you open two copies of the Customer form, the objects will be named Customer and CustomerN (where N is an additional character that makes the name unique, e.g. Customer1).
- Object Permissions
Topics include: enabling object permissions, setting object permissions, setting permissions to all objects of a type, where view records permission is required for the underlying table or set, group permission flowchart.
- Object Properties Table Lookups
The value of using object properties to populate a list is that the developer can use a variety of other control types. The Object Properties tab of the Table Lookups form demonstrates five different ways to do table lookups.
- Object Types
The following types of objects are supported by Alpha Anywhere.
- Objects in the SQL Namespace
With Alpha Anywhere classes of objects and enumerations can be grouped into namespaces. The namespace SQL has been added in order to group the new object classes that implement support for SQL databases. To dimension a variable for one of these objects, use the syntax SQL::. To help get you used to this syntax, all of the types are named referred to by their fully qualified names.
- Objects That Do Table Lookups
It is quite common in database application design to present the user with a list of choices. Occasionally, a list is static and hard coded, but often the list is table driven. Sometimes, a list needs to change dynamically, depending on the value of another form object, selection text, or variable. Often the developer will make the list selections more user friendly by presenting an "alias" for an encoded field. This document explores how to develop these types of lists in Alpha Anywhere.
- Objects that Resize with the Form
Alpha Anywhere allows you to stretch and move form objects as the form is resized. Now you can allow end users to resize forms to increase the size of form fields. The key benefit of this feature is that you can create forms that will look well designed regardless of the screen resolution (e.g. 800 x 600 or 1024 x 768 pixels).
- Objects that support Parsing
Some of the SQL objects support parsing directly. By this, we mean that you can declare the variable and immediately have it parse a string to assign values. These objects include:
Methods
- OBJECT.ACTIVATE Method
Sets focus to the object, optional flags 'E' - activate and edit cell in browse, 'A' - additive activate in design mode.
- OBJECT.ACTIVE Method
Returns the name of the control that has focus.
- OBJECT.ACTIVE_DRILLDOWN Method
Returns the name of the deepest control that has focus.
- OBJECT.ACTIVE_PREV Method
Returns the name of the control that previously had focus.
- OBJECT.ALLOW_CHANGE Method
Specifies if data can be edited.
- OBJECT.ALLOWCHANGESTATUS Method
Specifies if the Layout allows editing.
- OBJECT.ARCHIVE Method
Generates a PDF for the specified layout.
- OBJECT.BASEQUERYRUN Method
Sets the base filter and order expressions for a layout.
- OBJECT.CANCEL Method
Cancels changes to the current record.
- OBJECT.CHANGE_MODE Method
Puts a layout into chage mode.
- OBJECT.CHILD Method
Returns a pointer to the specified child object contained by the object.
- OBJECT.CHILD_ENUM Method
Return a CR-LF separated list of child objects.
- OBJECT.CHILDREN Method
Returns the number of objects contained by the object.
- OBJECT.CLASS Method
Returns the class of the object.
- OBJECT.COMMAND Method
Send a command notification to an object that excepts commands.
- OBJECT.COMMIT Method
Saves the current record.
- OBJECT.CONTAINER_GET Method
Get the name of the container object for an object if any.
- OBJECT.COPY_PREV_FIELD Method
Copies previous field on browses and forms.
- OBJECT.COPY_PREV_RECORD Method
Copies previous record. Used with browses and forms.
- OBJECT.CURSOR_GET Method
Shows cursor information on browses and forms.
- OBJECT.CURSOR_SET Method
Places the cursor at the specified position.
- OBJECT.DATA_ENTRY_STYLE Method
Returns the layout's window mode.
- OBJECT.DELETE Method
Delete a main Alpha Anywhere program.
- OBJECT.DELETE_RECORD Method
Deletes the current record.
- OBJECT.DIAL_PHONE Method
Dials the phone number in the control.
- OBJECT.DICTIONARY_GET Method
Returns the dictionary where the layout is stored.
- OBJECT.DISABLE Method
Disables the main Alpha Anywhere program window.
- OBJECT.DOWN Method
Moves the focus down to the next object (e.g. the next field in a form.)
- OBJECT.DUPLICATE_RECORD Method
Duplicates the current record.
- OBJECT.ENABLE Method
Allows the form, field, button, checkbox, etc, to receive focus.
- OBJECT.EVAL Method
Evaluates an expression in the context of an object.
- OBJECT.FETCH_FIRST Method
Moves to the first record in the query.
- OBJECT.FETCH_LAST Method
Moves to the last record in the query.
- OBJECT.FETCH_NEXT Method
Moves to the next record in the query.
- OBJECT.FETCH_PREV Method
Moves to the previous record in the query.
- OBJECT.FIELD_GET Method
Returns a pointer to the table field bound to the control.
- OBJECT.FILTER_GET Method
Returns the current filter for the layout.
- OBJECT.FIND Method
Returns the first record that matches the search criteria.
- OBJECT.FIND_AND_REPLACE Method
Displays the Find and Replace dialog.
- OBJECT.FINDBY_DEFINEDKEY Method
Displays a customized Find by Key dialog.
- OBJECT.GETACTIVEOBJPARENT Method
Returns a pointer to the parent container of the object that has focus.
- OBJECT.HAS_METHOD Method
Indicates whether or not an object has a specified method.
- OBJECT.HIDE Method
Hides the window.
- OBJECT.ICON_GET Method
Returns the name of the associated icon and icon type.
- OBJECT.INDEX_NAME Method
Returns the name of the current primary index or query.
- OBJECT.INDEX_POINTER Method
Returns a pointer to the current primary index or query.
- OBJECT.INDEX_SET Method
Select an index or query.
- OBJECT.INDEX_SETEXPLICIT Method
Sets the primary index or query.
- OBJECT.IndexSetDialog Method
The .IndexSetDialog() method displays the Primary Index or Query dialog box.
- OBJECT.IS_ON_LAST_OBJECT Method
Indicates if the current object is the last object on the layout.
- OBJECT.ISVISIBLE Method
Indiciates if the window is visible.
- OBJECT.KINDOF Method
Returns the kind of object.
- OBJECT.LEFT Method
Moves the focus to the left.
- OBJECT.LOCATE Method
Displays the Locate dialog box.
- OBJECT.LOCATE_NEXT Method
Finds the next record with a value matching Value. Searches all fields unless Fieldname is specified.
- OBJECT.LOCATE_PREV Method
Finds the previous record that matches the value to find.
- OBJECT.MARK_RECORD Method
Marks the current record.
- OBJECT.MAXIMIZE Method
Maximizes the window.
- OBJECT.MENUITEMCHECK Method
Adds or removes a checkmark next to a menu entry in a form or browse.
- OBJECT.MENUITEMENABLE Method
Enables or disables a menu entry.
- OBJECT.MENUITEMRESET Method
Removes any checkmarks and enables a menu entry.
- OBJECT.MINIMIZE Method
Minimizes the main program window.
- OBJECT.MODE_GET Method
Returns the current mode for the form or browse.
- OBJECT.MULTI_SELECT Method
Displays the Multi-Select Records dialog.
- OBJECT.NAME Method
Returns the object's name.
- OBJECT.NAVIGATOR Method
Displays the Goto which field? dialog.
- OBJECT.NEW_RECORD Method
Adds a new record to a table bound to the layout.
- OBJECT.NEXT Method
Moves focus to the next control as defined by the tab order.
- OBJECT.ORDER_GET Method
Returns the current order expression for the browse or form.
- OBJECT.OUTPUT_FILE_OVERRIDE Method
Defines the name for the printed file.
- OBJECT.PREV Method
Moves to the previous control as defined by the tab order.
- OBJECT.PREVIEW Method
Displays the Preview dialog box for the current layout.
- OBJECT.PRINT Method
Displays the Print dialog.
- OBJECT.PRINTER_OVERRIDE Method
Sets the printer configuration.
- OBJECT.PUSH Method
Triggers a button's onPush event.
- OBJECT.QUERY_BY_EXPN Method
Displays the Query by Expression dialog.
- OBJECT.QUERY_BY_TABLE Method
Opens the Query by Table dialog.
- OBJECT.QUERY_GENIE Method
Opens the Query Genie dialog.
- OBJECT.QUERYRUN Method
Returns the number of records selected by the query in the current layout.
- OBJECT.QUICK_EXPORT Method
Exports the selected records to Excel.
- OBJECT.QUICK_SEARCH Method
Does a quick search of the object. This is the same action as the Quick Filter command.
- OBJECT.QUICK_SEARCHEXCL Method
Finds all records that do not match the value in the current record.
- OBJECT.QUICK_SORT Method
Does a quick sort of the records using the selected field.
- OBJECT.QUICKFILTER Method
Returns a count of the matching records.
- OBJECT.QUICKSORTEXPLICIT Method
Sorts the table or set and displays it in the current layout.
- OBJECT.QUICKSORTMULTIFLD Method
Displays the Custom Sort dialog.
- OBJECT.QUICKSRCHEXPLICIT Method
Filters a form or browse based on the value in a field.
- OBJECT.QUICKSRCHMULTIFLD Method
Displays the Multi-field Quick Filter dialog.
- OBJECT.RECORDS_GET Method
Returns the number of records displayed in the layout.
- OBJECT.REFERENCE_EXPRESSION_GET Method
Returns and expression that can be used to reconstruct the object.
- OBJECT.REFRESH Method
Forces a layout to refetch data from the data source and redraw the layout.
- OBJECT.REFRESH_FIELDS Method
Refreshes each field in the layout.
- OBJECT.REFRESH_LAYOUT Method
Refreshes the layout. Same as hitting the F5 key or selecting Refresh Display from the menu.
- OBJECT.REPAINT Method
Repaints a control, browse, or form.
- OBJECT.RESTORE Method
Restores the window.
- OBJECT.RESYNCH Method
Performs a new query, refetches all data, and repaints the form or browse.
- OBJECT.RIGHT Method
Moves the focus to the right.
- OBJECT.RIGHTCLICK Method
Displays the right click menu for the selected object.
- OBJECT.RUN_SAVED_QUERY Method
Runs a saved query.
- OBJECT.SAVEAS Method
Prints a Report, Letter, or Label layout to file in PDF, HTML, RTF, TXT, Excel, or XPS format.
- OBJECT.SELECT_TEXT Method
Selects text in the current field.
- OBJECT.SEND Method
Emails a layout as an attached file.
- Object.ServerSideQuery_Show_All Method
Removes all server-side incremental filters for the primary table of the browse or form.
- Object.ServerSideQueryRetract Method
The ServerSideQueryRetract() Method removes the previously applied server-side incremental filter to the primary table of a browse or form layout (assuming that the primary table is an active-link table).
- Object.ServerSideQueryRun Method
The ServerSideQueryRun() Method applies an incremental filter to an active-link table.
- OBJECT.SESSIONHANDLE Method
Returns the session handle for the object's main program window.
- OBJECT.SET_DIRTY Method
Indiciates whether or not the layout has changed.
- OBJECT.SHOW Method
Displays the window.
- OBJECT.SHOW_ALL Method
When you use the .VIEWQUERIED() method to open a Form or Browse and apply a filter, you can specify if the filter that is applied to the target layout is a base filter, or a user filter. If the filter is a user-filter, the .SHOW_ALL() method can be used to remove the filter. However, if the filter is a base filter, the .SHOW_ALL() method cannot be used to remove the base filter.
- OBJECT.SHOW_MEMO Method
Opens the memo editor for a memo field.
- OBJECT.SIZE_GET Method
Returns the size of the window in inches.
- OBJECT.SPECIALQUERIES Method
Displays the Select Filter dialog.
- OBJECT.SPELL_CHECK Method
Displays the Spellchecker dialog for the specified object.
- OBJECT.TABLE_GET Method
Returns a pointer to the table object that contains the data referenced by the object.
- OBJECT.TOGGLE_FORMBROWSE Method
Toggles between form and browse views for the selected data.
- OBJECT.TOOLBARCHANGE Method
Loads and displays the selected toolbar.
- OBJECT.ToolbarControlEnable Method
Enables or disalbes an item in the control bar.
- OBJECT.TYPE Method
Returns the type for the data bound to an object.
- OBJECT.UNMARK_RECORD Method
Unmarks the current record.
- OBJECT.UP Method
Moves the focus up. (E.g. the previous field on a form.)
- OBJECT.VARIABLES Method
Returns a pointer to a dot variable containing the values for an object's variables.