Hi,

I’m using the Scripting Bridge, and I was wondering if it ok to subclass SBXXX 
classes. Basically, I have a header file generated by the “sdp” tool with 
definitions as below:

And I’d like to subclass this to add some extra wrapping to hide some of the 
nastiness from the rest of the app and provide a tighter integration with the 
current app handling. I remember reading somewhere that these classes shouldn’t 
be subclassed, but I can’t seem to find it again now.

Thanks a lot
Dave

-------------------------

@interface SXPhotoshopApplication : SBApplication

- (SBElementArray *) documents;
- (SBElementArray *) fonts;
- (SBElementArray *) notifiers;

@property (copy, readonly) NSNumber *bestType;  // the best type for the 
object's value
@property (copy, readonly) NSNumber *defaultType;  // the default type for the 
object's value
@property (copy) NSDictionary *properties;  // all of this object's properties 
returned in a single record
@property (copy) SXPhotoshopColorValue *backgroundColor;
@property (copy, readonly) NSString *build;  // the build number of Adobe 
Photoshop application
@property (copy) id colorSettings;  // name of selected color settings' set
@property (copy) SXPhotoshopDocument *currentDocument;  // the frontmost 
document
@property SXPhotoshopE050 displayDialogs;  // controls whether or not Photoshop 
displays dialogs
@property (copy) SXPhotoshopColorValue *foregroundColor;
@property (readonly) double freeMemory;  // the amount of unused memory 
available to Adobe Photoshop
@property (readonly) BOOL frontmost;  // is Photoshop the frontmost application?
@property (copy, readonly) NSString *locale;  // language locale of application
@property (copy, readonly) NSArray *macintoshFileTypes;  // list of file image 
types Photoshop can open
@property (copy, readonly) NSString *name;  // the application's name
@property BOOL notifiersEnabled;  // enable or disable all notifiers
@property (copy, readonly) id preferencesFolder;  // full path to the 
preferences folder
@property (copy, readonly) NSArray *recentFiles;  // files in the recent file 
list
@property (copy, readonly) NSString *scriptingBuildDate;  // the build date of 
the scripting interface
@property (copy, readonly) NSString *scriptingVersion;  // the version of the 
Scripting interface
@property (copy, readonly) SXPhotoshopSettingsObject *settings;  // preference 
settings
@property (copy, readonly) NSString *systemInformation;  // system information 
of the host application and machine
@property (copy, readonly) NSString *version;  // the version of Adobe 
Photoshop application
@property (copy, readonly) NSArray *windowsFileTypes;  // list of file image 
extensions Photoshop can open

- (void) AETEScriptsScriptsJavaScriptNameName:(NSString *)JavaScriptNameName 
JavaScriptFileFile:(NSString *)JavaScriptFileFile JavaScriptTextText:(NSString 
*)JavaScriptTextText 
JavaScriptDebuggingDebugging:(BOOL)JavaScriptDebuggingDebugging 
JavaScriptMessageMessage:(NSString *)JavaScriptMessageMessage;  // Photoshop 
scripting support plug-in
- (void) open:(id)x as:(SXPhotoshopOpAs)as withOptions:(SXPhotoshopOpenOptions 
*)withOptions showingDialogs:(SXPhotoshopE050)showingDialogs 
smartObject:(BOOL)smartObject;  // open the specified document file(s)
- (void) print:(id)x sourceSpace:(SXPhotoshopE945)sourceSpace 
printSpace:(NSString *)printSpace intent:(SXPhotoshopE130)intent 
blackpointCompensation:(BOOL)blackpointCompensation;  // print the specified 
object(s)
- (void) quit;  // quit the application
- (NSArray *) PhotoshopOpenDialog;  // use the Photoshop open dialog to select 
files
- (NSString *) batch:(NSString *)x fromFiles:(NSArray *)fromFiles 
from:(NSString *)from withOptions:(SXPhotoshopBatchOptions *)withOptions;  // 
run the batch automation routine
- (NSString *) createPDFPresentationFromFiles:(NSArray *)fromFiles 
toFile:(id)toFile withOptions:(SXPhotoshopPresentationOptions *)withOptions;  
// create a PDF presentation file
- (NSString *) createContactSheetFromFiles:(NSArray *)fromFiles 
withOptions:(SXPhotoshopContactSheetOptions *)withOptions;  // create a contact 
sheet from multiple files
- (NSString *) createPhotoGalleryFromFolder:(id)fromFolder 
toFolder:(id)toFolder withOptions:(SXPhotoshopGalleryOptions *)withOptions;  // 
Creates a web photo gallery
- (NSString *) createPhotoMergeFromFiles:(NSArray *)fromFiles;  // DEPRECATED. 
Merges multiple files into one, user interaction required.
- (NSString *) createPicturePackageFromFiles:(NSArray *)fromFiles 
withOptions:(SXPhotoshopPicturePackageOptions *)withOptions;  // create a 
picture package from multiple files
- (BOOL) featureEnabledName:(NSString *)name;  // is the feature with the given 
name enabled?
- (void) purge:(SXPhotoshopE150)x;  // purges one or more caches
- (void) refresh;  // pause the script until the application refreshes
- (SXPhotoshopRGBColor *) webSafeColorFor:(SXPhotoshopColorValue *)for_;  // 
find the closest web safe color for a color
- (void) clear;  // clear current selection
- (void) copy NS_RETURNS_NOT_RETAINED;  // copy current selection to the 
clipboard
- (void) copyMerged NS_RETURNS_NOT_RETAINED;  // copy current selection to the 
clipboard. Include data in all visible layers.
- (void) cut;  // cut current selection to the clipboard
- (void) doAction:(NSString *)x from:(NSString *)from;  // play an action from 
the Actions Palette
- (NSString *) doJavascript:(id)x withArguments:(NSArray *)withArguments 
showDebugger:(SXPhotoshopE940)showDebugger;  // execute a JavaScript
- (void) pasteClippingToSelection:(BOOL)clippingToSelection;  // paste 
clipboard into the current document

@end










_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to