CREATE


PLBCMP GUI Only

square.png Objects

square.png Object Creates

 

The CREATE instruction creates all necessary data structures for an object, load any resources from the resource portion of the program and load any required data from any specified disk files. The CREATE instruction does not make the object visible to the user. The ACTIVATE instruction must be used for that purpose.

 

There are many different formats for the CREATE instruction, with each object type having a different format. This is because of the widely varying types of information required for each of the different objects. See the specific object sections for details concerning the creation of the various objects.

Note the following:

  1. All object screen dimensions may be given in character positions on the screen. There is no need to work with pixel coordinates. The PIXEL mode of addressing may be enabled by using the SETMODE verb.

  2. Any object loaded from the resource portion of the program or a resource file must have a resource number from 128 to 399, or greater than 700. Any other resource number will cause the runtime to generate an O101 error.

  3. If a requested resource cannot be found during the creation of an object, the runtime generates an O101 error.

  4. If a system error causes the creation of an object to fail, the runtime generates an O103 error.

  5. If the screen dimensions for an object are too small, the runtime generates an O104 error.

  6. If not enough memory is available to create an object, the runtime generates an O106 error.

  7. For fonts, the logical string of the character variable or character literal describes the font. This string must contain the font name and may contain font style information. The string is formatted as follows:

    " {font-name} ( {style}, ...) "
    or
    " ' {font-name} ' ( {style}, ...) "
    Where: 

  8. {font-name}

    is one of SYSTEM, FIXED, HELVETICA, TIMES. These are the default fonts supported. If additional fonts are available, they may be accessed using one of the following font name definition strings:

     

      >font-name - To specify a Windows installed font, place a '>' character before the font name.
      >font-file.font-name - To specify a font from a font resource file, create a string containing a '>' character, the font file name, a period and the font file member name.
     

    If the {font-name} contains blanks (i.e., MS Sans Serif), the {font-name} should be enclosed by single quote characters(i.e. 'MS Sans Serif'.

     

    {style}

    is the BOLD or ITALIC keyword or a number. The number may be from 8 to 72 and indicates the point size. More than one style specification may be given separated with commas (i.e., BOLD,12).

 

 

See Also: DESTROY, Object Instructions

 



PL/B Language Reference CHECKPROP DEACTIVATE