X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a72f4631fe5ab7ebeefdacf8ec9c826ea962133f..88f67c2242209b8a752b515fdec30fd6ef858a18:/wxPython/src/_clipbrd.i diff --git a/wxPython/src/_clipbrd.i b/wxPython/src/_clipbrd.i index 1c262b3888..23391b0eba 100644 --- a/wxPython/src/_clipbrd.i +++ b/wxPython/src/_clipbrd.i @@ -65,7 +65,7 @@ True on success.", ""); - %apply SWIGTYPE *DISOWN { wxDataObject *data }; + %disownarg( wxDataObject *data ); DocDeclStr( virtual bool , AddData( wxDataObject *data ), @@ -84,8 +84,8 @@ do not delete the data explicitly. :see: `wx.DataObject`", ""); - - %clear wxDataObject *data; + %cleardisown( wxDataObject *data ); + DocDeclStr( virtual bool , IsSupported( const wxDataFormat& format ), @@ -122,7 +122,7 @@ normal clipboard, if primary is True.", ""); DocDeclStr( static wxClipboard *, Get(), "Returns global instance (wxTheClipboard) of the object.", ""); - + }; @@ -142,7 +142,8 @@ normal clipboard, if primary is True.", ""); self._instance = None def _checkInstance(self): if self._instance is None: - self._instance = self._initfunc(*self._args, **self._kwargs) + if wx.GetApp(): + self._instance = self._initfunc(*self._args, **self._kwargs) def __getattr__(self, name): self._checkInstance() return getattr(self._instance, name)