Forum Navigation
You need to log in to create posts and topics.

Cocoa Save options (IKSaveOptions) problem

Posted by: artlythere <artlythere@...>

 
Can anyone tell me how to add or keep Photoshop in this submenu as an option? It will init with that type, but refuses to retain it or re-display it if you change to another type in the popup after. It disappears.
I have tried a delegate to filter the types, and that did not work to return Photoshop back to the menu. : ( 
if (UTTypeConformsTo((CFStringRef)utType,(CFStringRef)@"com.adobe.photoshop-image"))
  {
  return YES;
  }
Apparently that is not one of the types the delegate even checks for.  This is the delegate.
- (BOOL)saveOptions:(IKSaveOptions *)saveOptions shouldShowUTType:(NSString *)utType;
?
Robert Bob
'-------------
compile as "Objective-C"
 
include library "Quartz"
BeginCDeclaration
#include <Quartz/Quartz.h>
EndC
toolbox fn NSApplicationLoad = Boolean
fn NSApplicationLoad()
BeginCDeclaration
 
CFURLRef  CFURLCopyPutFileModal();
EndC
BeginCFunction
 
CFURLRef CFURLCopyPutFileModal()
{
NSDictionary* mImageProperties;
NSString* mImageUTType;
IKSaveOptions* mSaveOptions;
 NSURL* url = NULL;
 NSSavePanel * savePanel = [NSSavePanel savePanel];
 mSaveOptions = [[IKSaveOptions alloc] initWithImageProperties:NULL imageUTType: @"com.adobe.photoshop-image"];
 
[mSaveOptions addSaveOptionsAccessoryViewToSavePanel: savePanel];
 
     
 if ( [savePanel runModal] == NSOKButton ) url = [[savePanel URL] retain];
 
return (CFURLRef)url;
}
 
EndC
   
toolbox fn CFURLCopyPutFileModal() = CFURLRef
dim as CFURLRef     url
 
url = fn CFURLCopyPutFileModal()
long if ( url )
open "O", #1, @url
close 1
CFRelease( url )
end if
'-------------


To unsubscribe, e-mail: fbcocoa-unsubscribe@welovegod.org For additional commands, e-mail: fbcocoa-help@freegroups.net