objectinfoarray(
objectinfoarray(
FORMULA
,
QUERY
,
SEPARATOR
)

The objectinfoarray( function builds a text array of form object properties

Parameters

This function has three parameters:

formula – is the formula that will be used to extract the properties of the objects on a form and store them in an array. The entire formula must be enclosed in quotes (see Quotes). The formula normally contains one or more objectinfo( functions to extract properties from the objects. If the formula results in empty text (“”) for an object then no element is added to the array for that object.

query – is a true/false formula used to determine which objects should be included in the output array. The entire formula must be enclosed in quotes (see Quotes). The formula normally contains one or more comparisons using the objectinfo( function to extract properties from the objects. Note: This parameter is optional, if it is omitted then all form objects will be included in the output array.

separator – is the separator character to be used in between each array element. Note: This parameter is optional, if it is omitted then carriage returns will be used as separators.

Description

This function creates a Text Array by scanning objects in a form. In its simplest form, it has one parameter which is a formula that determines what properties of the form should be included in the array, and in what format. This example generates an array with one line per object, with each line containing the object type and its location and size.

    objectinfoarray({objectinfo("class")+": "+
        rectanglesizestr(objectinfo("rectangle"))})

The output of this example will look something like this:

    PushButtonObject: 13,87,26,73
    PushButtonObject: 13,506,26,152
    RectangleShapeObject: 48,18,622,638
    PushButtonObject: 13,20,26,58
    ImageDisplayObject: 901,1081,20,72
    ImageDisplayObject: 857,1055,32,88
    TextDisplayObject: 131,701,17,69
    TextEditorObject: 130,771,19,39
    StepperButtonObject: 130,812,19,18
    SliderButtonObject: 126,830,26,95

If you want the output array to include only a subset of the objects in the form, add a second formula that specifies which objects should be included, like this:

    objectinfoarray({objectinfo("name")},{objectinfo("name")<>""})

This example will list all of the named objects in the form (see Object Names), like this:

    LeftSideBorder
    CenterBorder
    RightSideBorder
    PhotoMatrix

The Text Array produced by this function normally has each element separated by a carriage return, but you can change that by adding a third parameter. This example is identical to the previous one except for the fact that the names will be separated by commas.

    objectinfoarray({objectinfo("name")},{objectinfo("name")<>""},",")

Here is typical output from this example:

    LeftSideBorder,CenterBorder,RightSideBorder,PhotoMatrix

See Also

- activeobjectaction -- allows a procedure to communicate with the object on the current form that is currently being edited (if any).
- changeobject -- modifies the properties of one object in a form.
- changeobjects -- modifies the properties of one or more objects in a form.
- cloneform -- copies all of the objects in a form (optionally, with modifications) into the active form.
- cloneobjects -- duplicates objects in a form (with modifications).
- closeactiveobject -- closes any object whose text is currently being edited.
- datamode -- switches a form from graphics mode into data mode.
- deleteobject -- deletes the specified object from the current form.
- deleteselectedobjects -- deletes selected objects from a form.
- draggraybox -- facilitates dragging something around in a form window.
- dragtext -- starts drag-and-drop of text.
- formcleanview -- cleans up extraneous NSView objects in the current form.
- formxy -- programmatically scrolls a form to a new position.
- graphicsmode -- switches a form into graphics mode.
- info("activeobject") -- returns the name of the currently active text editor or word processor object (if any).
- info("activeobjectid") -- returns the object ID of the currently active text editor or text list object, if any.
- info("activesuperobject") -- returns the name of the currently active text editor or word processor object, if any.
- info("click") -- returns the location of the last mouse click in screen relative coordinates.
- info("clickedobjectid") -- returns the object ID of the clicked object.
- info("focusobject") -- returns the name of the currently active text editor or word processor object, if any.
- info("focusobjectid") -- returns the object ID of the currently active text editor or text list object, if any.
- info("scrollpoint") -- returns the distance the current form is scrolled horizontally and vertically.
- magicformwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magicwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magnification -- changes the magnification of a form.
- Modifiable Object Properties -- describes the properties of graphic objects that can be modified by a program (dimensions, color, font, title, etc.).
- newformobject -- creates a new graphic object in a form.
- object -- selects an object (based on the object name).
- objectaction -- allows a procedure to communicate with an object on the current form.
- objectid -- selects one graphic object in the current form based on an ID number.
- objectinfo( -- returns information about a graphic object: its location, size, color, font, etc.
- objectnumber -- identifies one graphic object from a set of selected graphic objects in the current form.
- openasyncprogresswindow -- opens a floating progress window for asynchronous operations (urltask(, timers).
- progressalert -- displays a progress alert if an operation is going to take a long time.
- progressbar -- updates a progress bar on the current form.
- selectallobjects -- selects all the graphic objects in the current form.
- selectnoobjects -- unselects all the graphic objects in the current form.
- selectobjects -- uses a formula to select one or more objects in the current form.
- startgraphicschange -- adds undo support to a procedure.
- Text Display Programming -- programming a Text Display Object.
- Text Editor Programming -- programming a Text Editor Object.
- textlisttableoptions -- sets up text list table options
- Web Browser Programming -- programming a Web Browser Object (including JavaScript).
- xytoxy( -- converts a point or rectangle from one co-ordinate system to another.

History

Version | Status | Notes
10.0 | New | New in this version.