RestrictedHolder class | objects.t[5018]

A "restricted holder" is a generic mix-in class for various container types (Containers, Surfaces, Undersides, RearContainers, RearSurfaces) that adds a restriction to what can be contained.

`class RestrictedHolder : object`

Superclass Tree (in declaration order)

`RestrictedHolder`
`object`

Subclass Tree

`RestrictedHolder`
`RestrictedContainer`
`RestrictedRearContainer`
`RestrictedRearSurface`
`RestrictedSurface`
`RestrictedUnderside`

Global Objects

(none)

Summary of Properties

`validContents`

Summary of Methods

`canPutIn checkPutDobj`

Properties

`validContents` | `objects.t[5025]`

A list of acceptable items for the container. This list can be used to identify the objects that can be put in the container (or on the surface, under the underside, or behind the rear container or surface).

Methods

`canPutIn (obj)` | `objects.t[5037]`

Is the given object allowed to go in this container (or on/under/behind it, as appropriate for the type)? Returns true if so, nil if not. By default, we'll return true if the object is found in our validContents list, nil if not. This can be overridden if a subclass wants to determine which objects are acceptable with some other kind of per-object test; for example, a subclass might accept only objects of a given class as contents, or might accept only contents with some particular attribute.

`checkPutDobj (msgProp)` | `objects.t[5043]`

Check a PUT IN/ON/UNDER/BEHIND action to ensure that the direct object is in our approved-contents list.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3