Logo Search packages:      
Sourcecode: wxwindows2.4 version File versions

def py::wxd::Functions::PyTypeCast (   obj,
  typeStr 
)

This helper function will take a wxPython object and convert it
to another wxPython object type.  This will not be able to create
objects that are derived from wxPython classes by the user, only
those that are actually part of wxPython and directly corespond to
C++ objects.

This is useful in situations where some method returns a generic
type such as wxWindow, but you know that it is actually some
derived type such as a TextCtrl.  You can't call TextCtrl
specific methods on a Window object, but you can use this
function to create a TextCtrl object that will pass the same
pointer to the C++ code.  You use it like this:

   textCtrl = PyTypeCast(window, "TextCtrl")

WARNING:  Using this function to type cast objects into types that
          they are not is not recommended and is likely to cause
          your program to crash...  Hard.

Definition at line 1032 of file Functions.py.

01032                             :
    """This helper function will take a wxPython object and convert it
    to another wxPython object type.  This will not be able to create
    objects that are derived from wxPython classes by the user, only
    those that are actually part of wxPython and directly corespond to
    C++ objects.

    This is useful in situations where some method returns a generic
    type such as wxWindow, but you know that it is actually some
    derived type such as a TextCtrl.  You can't call TextCtrl
    specific methods on a Window object, but you can use this
    function to create a TextCtrl object that will pass the same
    pointer to the C++ code.  You use it like this:

       textCtrl = PyTypeCast(window, "TextCtrl")

    WARNING:  Using this function to type cast objects into types that
              they are not is not recommended and is likely to cause
              your program to crash...  Hard."""
    pass

def Py_isinstance(obj, klasses):


Generated by  Doxygen 1.6.0   Back to index