Forum breadcrumbs - You are here:WeLoveGod RallysPublic Forums: fbcocoaCocoa Save options (IKSaveOptions …
You need to log in to create posts and topics.
Cocoa Save options (IKSaveOptions) problem
1,678 Posts
#1 · December 4, 2012, 5:48 am
Quote from Forum Archives on December 4, 2012, 5:48 amPosted 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>EndCtoolbox fn NSApplicationLoad = Booleanfn NSApplicationLoad()BeginCDeclarationCFURLRef CFURLCopyPutFileModal();EndCBeginCFunctionCFURLRef 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;}EndCtoolbox fn CFURLCopyPutFileModal() = CFURLRefdim as CFURLRef urlurl = fn CFURLCopyPutFileModal()long if ( url )open "O", #1, @urlclose 1CFRelease( url )end if'-------------
To unsubscribe, e-mail: fbcocoa-unsubscribe@welovegod.org For additional commands, e-mail: fbcocoa-help@freegroups.net
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
Click for thumbs down.0Click for thumbs up.0