Chapter Contents

Previous

Next
Row/Column Data Vector Class: _init

Row/Column Data Vector Class: _init



Initializes the data vector


Syntax
Details
Example

Syntax

CALL SEND (data-vector-id, '_init'<, data-vector-info>);

Argument Type Description
data-vector-info
N specifies the identifier of an SCL list that contains initialization information that the data vector can use when initializing


Details

The _init method does the setup of the row/column data vector. It also calls the super _init method. The _init method is called whenever you make an instance of the Row/Column Data Vector class, either through a call to _new or to the instance function.

The data-vector-info list is optional. The list can tell the data vector which type of viewer this data vector will be used with if that information is known. This list can contain named items of NOFORME or NOTABLEE.

If you do not use this list, resources for both the form-specific and table-specific parts of the data vector are allocated, and you are allowed to use data vector methods that deal with information that either viewer will use.

When you create the row/column data vector, if you know that it will only be used in conjunction with the table editor, you can save memory and receive additional error checking by setting a named item of NOFORME to 1 in this list. In that case, only the table-specific resources are allocated, and when you attempt to call methods of the row/column data vector that deal with form-specific information, you receive a program halt.

On the other hand, when you create a row/column data vector, if you know it will only be used in conjunction with the form editor, you can receive additional error checking by setting a named item of NOTABLEE to 1 in this list. In that case, there are not any resource savings, but when you attempt to call methods of a row/column data vector that deal with table-specific information, you receive a program halt.

The table editor sets the NOFORME item to 1 in the data-vector-info list for the data vectors it uses internally for the resource savings. The form editor does not pass a data-vector-info list for the data vectors it uses internally.


Example

The following example makes a row/column data vector that is used only with the table editor:

Make a row/column data vector for table only.
arglist = makelist(); rc = setnitemn(arglist, 1, 'NOFORME'); classid = loadclass('sashelp.fsp.rcdvec'); call send(classid, '_new', rcdvecid, arglist);
Try to call a form-only method.
call send(rcdvecid, '_setClassName', 'sashelp.fsp.radiobox.class');

The above code causes a program halt because it attempts to call a method that is only for the table even though we have specified that this row/column data vector is used only with a form:

ERROR: Table-specific method called on 
       form-specific data vector.
Arguments passed to SEND:
  1 RCDVECID = 33
  2 (Character Literal) = '_setClassName'
Parameters passed to SEND ENTRY:
  1 (Character Literal) = 'sashelp.fsp.
                           radiobox.class'


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.