FlavorFlags theFlags;
UInt16 flavors;
bool firstFileAdded = false;
+
+ wxString filenamesPassed ;
CountDragItems( (DragReference)m_currentDrag, &items );
for (UInt16 index = 1; index <= items; ++index)
case kDragFlavorTypeHFS:
{
- wxFileDataObject *fdo = dynamic_cast<wxFileDataObject*>(m_dataObject);
- wxASSERT( fdo != NULL );
-
- if ((theData != NULL) && (fdo != NULL))
+ if (theData != NULL)
{
HFSFlavor* theFile = (HFSFlavor*) theData;
wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec );
- if ( !firstFileAdded )
- {
- // reset file list
- fdo->SetData( 0, "" );
- firstFileAdded = true;
- }
-
if (!name.IsEmpty())
- fdo->AddFile( name );
+ filenamesPassed += name + wxT("\n");
}
}
break;
}
}
}
+ if ( filenamesPassed.Len() > 0 )
+ {
+ wxCharBuffer buf = filenamesPassed.fn_str();
+ m_dataObject->SetData( wxDataFormat( wxDF_FILENAME ) , strlen( buf ) , (const char*) buf );
+ }
}
return true;