[ library(viewable) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

viewable_create(?ViewableName, +Elements, ++Type, ++LocNamesList)

Create a viewable, specifying both type and location names.
ViewableName
A string or atom; the name of the new viewable.
Elements
A list nested to at least a depth equal to the number of dimensions, or an array with sufficient dimensions (as created for example by dim/2).
Type
A ground term which is a valid viewable type.
LocNamesList
A list of lists of strings (location names).

Description

NOTE:When there are no registered visualisation clients, this predicate succeeds with any arguments, and has no effect.

This predicate works exactly the same as viewable_create/3 except that you have the added ability to set location names (e.g. row/column names). The LocNamesList argument should be a list as long as the number of dimensions in the viewable. The ith element LocNames of LocNamesList should be a list whose length is equal to the size of the ith dimension of the new viewable. The jth element of LocNames should be a ground string and this will become the name of the jth location of the ith dimension.

For a more detailed description of creating viewables, refer to the documentation for viewable_create/3.

Resatisfiable

no

Exceptions

(4) instantiation fault
ViewableName is not an atom, string or free variable.
(1) general error
ViewableName is the name of an existent viewable.
(1) general error
Elements is not a regular nested list or array with enough dimensions.
(1) general error
Type is not a ground valid type.
(5) type error
One of the viewable elements violates the element type.
(5) type error
LocNamesList is not a correctly-sized list of correctly-sized lists of strings.

Examples


            To create a 2 x 3 viewable, you could do:

            viewable_create(v1, [[A,B,C], [D,E,F]], 
                            array([fixed, fixed], any), 
                            [["foo", "bar"], ["tom", "dick", "harry"]]).

            This would have two rows (named "foo" and "bar") each with three
	    columns (named "tom", "dick" and "harry").
				    

See Also

viewable_create / 2, viewable_create / 3, viewable_expand / 4