Description Usage Arguments Details Author(s)
Assert that an object is of a particular type
1 2 | checkPtrType(w, klass = "GtkWidget", nullOk = FALSE, critical = TRUE)
implements(obj, interface)
|
w |
An object whose type is to be verified. |
klass |
The type the object is expected to be. |
nullOk |
Whether the object is allowed to be |
critical |
Whether to stop if the object is not of the specified type. If this is a character vector, then the function will stop on mismatch and report that string as the error message. |
obj |
A GObject. |
interface |
The interface that |
All RGtk2 functions check that the arguments are of the correct type, if possible.
The checkPtrType
function is most useful to the user when it is not known if an object is of
the required type. A good example is the user data argument of a callback function.
To see if a GObject
implements a certain interface, use implements
.
Michael Lawrence and Duncan Temple Lang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.