Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: AppleScript-Cocoa Impedance Mismatch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Cocoa Impedance Mismatch



Also, when you have a fixed number of types, I would use an enumeration for the type rather than a string. It's clearer, prevents abuse and mistyping, and mentions the possible values automatically in the scripting dict.

So it turns out this is not actually possible. When you have both an enumerator named "book" and a class named "book," AppleScript interprets the word "book" as a class name and refuses to convert it into a constant. Thus, it seems, we can either have subclasses or have enumerated types, but not both. Hence, the use of strings.

Given time constraints, I think I'm going to have to abandon the subclasses and just have a single "medium" type, as unfortunate as that will be...

Cheers,
Mike Lee, Major-domo
Delicious Monster Software, LLC


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.