On Nov 29, 2007, at 7:16 PM, James Walker wrote:
I have a get-file dialog that sets up a type pop-up using UTIs. It
doesn't work on one computer, and does work on another, both running
10.5.1. By "doesn't work", I mean that files with an extension that
should associate them with one of these UTIs are dimmed and hence
cannot be chosen.
I used the lsregister tool to verify that my UTIs are properly
registered. When I do a Finder Get Info on one of the files in
question, the Kind string shown there matches one of the items in the
type pop-up. The UTIs are declared using UTImportedTypeDeclarations
in my Info.plist.
The computer where it does work is an Intel Mac, and the one where it
doesn't work is PowerPC.
Here's the code that sets up the dialog:
NavDialogCreationOptions opts;
NavGetDefaultDialogCreationOptions( &opts );
NavDialogRef navDialog;
OSStatus err = NavCreateGetFileDialog( &opts, NULL, NULL, NULL,
NULL,
NULL, &navDialog );
if (err == noErr)
{
CFTypeRef theUTIs[] = {
CFSTR("com.frameforge3d.uti.fbx"),
CFSTR("com.frameforge3d.uti.obj"),
CFSTR("com.frameforge3d.uti.3ds")
};
autoCFArrayRef utiArray( CFArrayCreate( NULL, theUTIs,
sizeof(theUTIs)/sizeof(theUTIs[0]),
&kCFTypeArrayCallBacks ) );
ThrowIfNULL_( utiArray.get() );
err = NavDialogSetFilterTypeIdentifiers( navDialog,
utiArray.get() );
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden