gtkCheckInherits {RGtk} | R Documentation |
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.
gtkCheckInherits(w, klass="GtkWidget", nullOk=FALSE, critical=TRUE)
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.
|
This
A logical value or an error!
Duncan Temple Lang <duncan@research.bell-labs.com>