This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19
Handling 4D View Pro areas

Handling 4D View Pro areas  


 

When working with 4D View Pro areas in your forms, you need to handle several elements:

  • The 4D View Pro form area (4D form object): contains and displays the 4D View Pro object. This area is defined by a name ("Object name" field in the Property list).
  • The 4D View Pro object (C_OBJECT type variable or expression): stores the whole spreadsheet contents (see below). You can get or set this object using the VP IMPORT FROM OBJECT or VP Export to object commands.
  • The 4D View Pro document (.4vp documents): stores the whole spreadsheet contents in JSON format.

When loading a 4D View Pro object in a form area, 4D generates the On VP Ready form event once the whole area is loaded. You must execute any 4D View Pro code handling the area in this event, otherwise an error is returned.

The 4D View Pro object describes the document and is automatically handled by the 4D View Pro commands. It contains the following properties:

PropertyValue typeDescription
versionLongintInternal component version
dateCreationTimestampCreation date
dateModifiedTimestampLast modification date
metaObjectFree contents, reserved for the 4D developer
spreadJSObjectReserved for the 4D View Pro component

The 4D View Pro form object variable manages information used by the 4D View Pro object. It contains the following variables:

 

PropertyValue typeDescription
areaText4D View Pro area name
callbacksObjectStores temporary information necessary for commands requiring callbacks such as importing and exporting. 
commandBuffersCollectionStores sequentially the commands called by the method and executes them as a batch (rather than individually) upon exiting the method, or if a command returns a value or the VP FLUSH COMMANDS is called. This mechanism increases performance by reducing the number of requests sent.
formulaBarBooleanIndicates whether or not the formula bar is displayed. Available only for the "toolbar" interface.
initedBooleanIndicates whether or not the 4D View Pro area has been initialized (see On VP Ready).
interfaceTextSpecifies the type of user interface:"ribbon", "toolbar", "none".

Note: The 4D View Pro form object variable is for information purposes only (i.e., debugging). Under no circumstances should it be modified.



See also 

VP Export to object
VP IMPORT FROM OBJECT

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Language

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)