different solution to debug messages
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -277,8 +277,7 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID )
|
|||||||
CFRelease(url);
|
CFRelease(url);
|
||||||
PasteboardPutItemFlavor( pasteboard, (PasteboardItemID) counter,
|
PasteboardPutItemFlavor( pasteboard, (PasteboardItemID) counter,
|
||||||
(CFStringRef) thisFormat.GetFormatId() , data, kPasteboardFlavorNoFlags);
|
(CFStringRef) thisFormat.GetFormatId() , data, kPasteboardFlavorNoFlags);
|
||||||
// don't release do CFRelease( data ), it's not documented but the samples don't release the data for non promised entries
|
CFRelease( data );
|
||||||
// also when running with the _debug version of carbon drag and drop is showing errors otherwise
|
|
||||||
counter++;
|
counter++;
|
||||||
fname = strtok (NULL,"\n");
|
fname = strtok (NULL,"\n");
|
||||||
}
|
}
|
||||||
@@ -293,8 +292,7 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID )
|
|||||||
else
|
else
|
||||||
PasteboardPutItemFlavor( pasteboard, (PasteboardItemID) itemID,
|
PasteboardPutItemFlavor( pasteboard, (PasteboardItemID) itemID,
|
||||||
(CFStringRef) thisFormat.GetFormatId() , data, kPasteboardFlavorNoFlags);
|
(CFStringRef) thisFormat.GetFormatId() , data, kPasteboardFlavorNoFlags);
|
||||||
// don't release do CFRelease( data ), it's not documented but the samples don't release the data for non promised entries
|
CFRelease( data );
|
||||||
// also when running with the _debug version of carbon drag and drop is showing errors otherwise
|
|
||||||
}
|
}
|
||||||
free( buf );
|
free( buf );
|
||||||
}
|
}
|
||||||
|
@@ -217,6 +217,16 @@ wxDropSource::~wxDropSource()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OSStatus wxMacPromiseKeeper( PasteboardRef inPasteboard, PasteboardItemID inItem, CFStringRef inFlavorType,
|
||||||
|
void *inContext )
|
||||||
|
{
|
||||||
|
OSStatus err = noErr;
|
||||||
|
|
||||||
|
// we might add promises here later, inContext is the wxDropSource*
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
wxDragResult wxDropSource::DoDragDrop(int flags)
|
wxDragResult wxDropSource::DoDragDrop(int flags)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( m_data, wxT("Drop source: no data") );
|
wxASSERT_MSG( m_data, wxT("Drop source: no data") );
|
||||||
@@ -235,6 +245,14 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
|
|||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
return wxDragNone;
|
return wxDragNone;
|
||||||
|
|
||||||
|
// we add a dummy promise keeper because of strange messages when linking against carbon debug
|
||||||
|
err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
|
||||||
|
if ( err != noErr )
|
||||||
|
{
|
||||||
|
CFRelease( pasteboard );
|
||||||
|
return wxDragNone;
|
||||||
|
}
|
||||||
|
|
||||||
err = PasteboardClear( pasteboard );
|
err = PasteboardClear( pasteboard );
|
||||||
if ( err != noErr )
|
if ( err != noErr )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user