assertions               package:RGtk2               R Documentation

_R_G_t_k_2 _T_y_p_e _A_s_s_e_r_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Assert that an object is of a particular type

_U_s_a_g_e:

     checkPtrType(w, klass = "GtkWidget", nullOk = FALSE, critical = TRUE)
     implements(obj, interface)

_A_r_g_u_m_e_n_t_s:

       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 'NULL'.

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 'obj' is expected to implement.

_D_e_t_a_i_l_s:

     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'.

_A_u_t_h_o_r(_s):

     Michael Lawrence and Duncan Temple Lang

