- if (theItem->descriptorType == typeFSS)
- {
- FSSpec spec;
- memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
- wxString file = wxMacMakeStringFromPascal( spec.name ) ;
- display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
- }
- else if ( theItem->descriptorType == typeFSRef )
+ AECoerceDesc (theItem, typeFSRef, theItem);
+
+ FSRef fsref ;
+ if ( AEGetDescData (theItem, &fsref, sizeof (FSRef)) == noErr )