Str255 theParentPath = "\p";
FSSpec theParentSpec;
FSRef theParentRef;
+ FSRef theRef ;
char theFileName[FILENAME_MAX];
char thePath[FILENAME_MAX];
+ // we loose the long filename by merely copying the spec->name
+ // so try the built-ins, which only work if the file exists, but still...
+
+ theErr = FSpMakeFSRef(spec, &theRef);
+ if ( theErr == noErr )
+ {
+ CFURLRef fullURLRef;
+ fullURLRef = ::CFURLCreateFromFSRef(NULL, &theRef);
+#ifdef __UNIX__
+ CFURLPathStyle pathstyle = kCFURLPOSIXPathStyle;
+#else
+ CFURLPathStyle pathstyle = kCFURLHFSPathStyle;
+#endif
+ CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, pathstyle);
+ ::CFRelease( fullURLRef ) ;
+ return wxMacCFStringHolder(cfString).AsString(wxFont::GetDefaultEncoding());
+ }
+
strcpy(thePath, "");
// GD: Separate file name from path and make a FSRef to the parent
OSStatus wxMacControl::SendEvent( EventRef event , OptionBits inOptions )
{
+#if TARGET_API_MAC_OSX
return SendEventToEventTargetWithOptions( event,
- HIObjectGetEventTarget( (HIObjectRef) m_controlRef ),
- inOptions );
+ HIObjectGetEventTarget( (HIObjectRef) m_controlRef ), inOptions );
+#else
+ #pragma unused(inOptions)
+ return SendEventToEventTarget(event,GetControlEventTarget( m_controlRef ) ) ;
+#endif
}
OSStatus wxMacControl::SendHICommand( HICommand &command , OptionBits inOptions )