Skip navigation.
 
mlRe: NSAppleEventDescriptor - getting a double (and other animals)
FROM : has
DATE : Tue Jan 22 18:59:09 2008

Luke Evans wrote:

> I wish to allow my scripting interface to accept 'any' for a
> property.  I see that this is handled in Cocoa by the relevant method
> being sent an object of type NSAppleEventDescriptor, and I have
> implemented the fairly straightforward and obvious code to handle the
> types string, int32 and boolean (these all being available on
> NSAppleEventDescriptor itself).  Now, I need to implement handlers for
> some other types (doubles, dates).


Best place for this sort of question is probably AppleScript-
implementors:

   http://lists.apple.com/mailman/listinfo/applescript-implementors

I'm not familiar with the finer workings of Cocoa Scripting, so dunno 
if there's any way to make it convert NSAppleEventDescriptors to their 
Cocoa equivalents upon request. If there isn't, you might look into 
using objc-appscript (http://appscript.sourceforge.net/objc-appscript.html
) as its AEMCodecs class provides AEDesc<->Cocoa mappings for all 
common descriptor types; see the CallAppleScriptHander sample project 
for an example of use.

HTH

has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org

Related mailsAuthorDate
mlNSAppleEventDescriptor - getting a double (and other animals) Luke Evans Jan 22, 05:46
mlRe: NSAppleEventDescriptor - getting a double (and other animals) has Jan 22, 18:59