• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Pragmatic use of private framework class (in this case OSADictionary)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pragmatic use of private framework class (in this case OSADictionary)


  • Subject: Pragmatic use of private framework class (in this case OSADictionary)
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 11 Mar 2008 10:50:51 +0000

Hello

I had previously posted the excerpt below with regard to browsing AppleScript dictionaries from within cocoa apps:

Are OSADictionaryView and OSADictionaryController as featured in the IB 3 Open Scripting Kit plug-in viable in cocoa?
The OSAKit header contains no interface for these classes, though OSADictionaryView exists as a nib within the OSAKit framework bundle.


Unable to make progress with this I fired up the F-script browser and discovered OSADictionary. Intuition lead me to the following:

@interface OSADictionary: NSObject
+ (void)chooseDictionary;
@end

- (void)showDictionary:(id)sender
{
[OSADictionary chooseDictionary];
}


This seems to work well when linked against the OSAKit framework, displaying the familiar Script Editor dictionary browser.
The Script Editor is itself scriptable, but seems to offer no dictionary methods.


I am aware of the caveats with regard to using any private API code (lack of support, future mutation etc).

My question is more general:

Is it anyway common in cocoa to utilise, in a pragmatic sense (ie: when all else seems to fail), such private classes?
Or should I not be tempted.


Regards

Jonathan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: shared NSImage from bundle
  • Next by Date: Re: CIImage (TIFFRepresentation) memory leak
  • Previous by thread: Re: Quit application when window closes
  • Next by thread: Check box cell in NSTableView
  • Index(es):
    • Date
    • Thread