Command Reference : User Objects : User Object Programming Support
User Object Programming Support
View and Procs
Data Members
EViews offers several programming language features that will aid you in creating, registering and working with user objects.
Note that there is additional programming language support for creating the programs that will be used to define your user object. These features are described in “Add-ins Design Support”.
The userobj command is used to create a new, unregistered user object as in
userobj myobject
where myobject is the name of the object to be created. A userobj created using this command will be empty, and will have no constructor or defined views and procs defined.
To declare a registered user object, you will use the name of the class followed by the name of the object:
userobj_class_name(options) myobject [args]
Depending on how the user object is designed, the declaration program may use options and additional arguments args when running the constructor program.
See Userobj::userobj.
The adduo command may be used to register a user object, as in
adduo(name="roll", version="1.0", desc="Rolling regression object") ./rolldef.ini
You may use the command to specify the object definition file, path, description, version number, documentation file, XML file, etc.
See adduo .
View and Procs
Each type of user object will have its own views and procs:
All user objects provide a small number of generic built-in views and procs. For example, the standard EViews label view for viewing and modifying the label contents and the display view for showing output in the object window are supported.
All user objects support the add and drop procs which may be used to populate the user object, and the extract proc may be employed to extract objects into the workfile.
In addition, registered user objects may provide custom views and procs. You should view the specific user object documentation file for details.
As with any EViews object, you may access the views and procs of the user object using the object View or Proc menu, or via the command line using the standard syntax:
myobject.view_name(options) [args]
myobject.proc_name(options) [args]
See “User Object Views” and “User Object Procs” for a listing of the built-in views and procs.
Data Members
The @hasmember(obname) function, available as a data member for all user objects, returns a boolean value depending on whether an object called obname currently exists inside the User Object.
The @members data member returns a space delimited string containing a list of all objects currently inside the user object.
See “User Object Data Members”.