gtkCheckInherits {RGtk}R Documentation

Verify an object's class

Description

Checks whether the given object extends the appropriate class, raising an error if not. This is used to validate an object before it is passed to C code which expects an object of the appropriate type.

Usage

gtkCheckInherits(w, klass="GtkWidget", nullOk=FALSE, critical=TRUE)

Arguments

w the object whose classes are to be checked to determine if it ``extends'' the class klass.
klass the class which the object w is expected to extend.
nullOk a logical value which controls whether a value of NULL for w is acceptable and passes the test. If this is not TRUE, a value of NULL throws an error.
critical a logical value or a string that controls whether an error is raised if the object w does not inherit from klass. If this is a string, it is used as the error message. If it is a logical value and is TRUE, an error is raised.

Details

This

Value

A logical value or an error!

Author(s)

Duncan Temple Lang <duncan@research.bell-labs.com>

References

See Also

inherits stop

Examples






[Package RGtk version 0.7-0 Index]