Added comments to NuTemplateElement about actions that are forwarded to template elements by the editor. Removed image file export's support for custom extensions, as it returns an NSImage anyway, and saves its TIFFRepresentation, and another extension would only have caused trouble.

This commit is contained in:
Uli Kusterer 2003-08-10 06:41:30 +02:00
parent 3f357eb9bd
commit 52a51f7d79
3 changed files with 10 additions and 9 deletions

View File

@ -1045,10 +1045,6 @@ static NSString *RKExportItemIdentifier = @"com.ulikusterer.resknife.toolbar.ex
return;
theData = [edClass imageForImageFileExport: resource];
if( [edClass respondsToSelector:@selector(extensionForImageFileExport:)] )
extension = [edClass extensionForFileExport];
panel = [NSSavePanel savePanel];
fName = [[resource name] stringByAppendingFormat: @".%@", extension];

View File

@ -41,11 +41,6 @@ functionality: */
image format. This will be a lossy conversion to a TIFF
file. */
+(NSImage*) imageForImageFileExport: (id <ResKnifeResourceProtocol>)theRes;
/*! @method extensionForImageFileExport:
@abstract If you implement imageForImageFileExport, return a string here that
provides the proper file extension for your file. By default the
host application substitutes "tiff" here. */
+(NSString*) extensionForImageFileExport: (id <ResKnifeResourceProtocol>)theRes;
@end

View File

@ -58,5 +58,15 @@
-(unsigned int) sizeOnDisk;
-(void) writeDataTo: (NuTemplateStream*)stream;
/* Apart from these messages, a NuTemplateElement may also implement the IBActions for
the standard edit commands (cut, copy, paste, clear). When an element is selected,
the template editor will forward any calls to these items to the element, if it
implements them, and it will automatically enable the appropriate menu items. It
will also forward validateMenuItem: for the Paste menu item to the element.
The showCreateResourceSheet: action will also be forwarded to elements by the
template editor. Use this to allow creating new list items or for similar
purposes ("Create New Resource..." is renamed to "Create List Entry" while the
template editor is key). */
@end