Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I use self-defined terms in main script?



On Saturday, July 02, 2005, at 10:31AM, Matt Neuburg <email@hidden> wrote:

>On Wed, 29 Jun 2005 15:02:30 -0400, "Christopher Hickman" <email@hidden>
>said:
>>If I have an AppleScript Studio application with some Objective-C classes
>>(let's say in my NSApp subclass), can I write an sdef to be able to use
>>AppleScript terms to call my own ObjC methods in my main AppleScript?
>
>Could you rephrase the question? In other words, could you describe in more
>detail what you'd like to have happen? m.

Yes, I can.  However, this was a "theoretical" question, and I don't have anything concrete that I'm trying to accomplish right now.  But I'll give an example of what I meant.

Suppose I have an AppleScript Studio application that has an Objective-C utility class to do stuff I can't do with AppleScript.  I wanted to know if I could write an sdef that defined AppleScript terminology for methods in that class and then use those terms in the AppleScript Studio app's main AppleScript.

Let's assume for simplicity's sake that my utility class is my application's delegate, and let's say that that class has a -[UtilityClass doFoo] method.  My sdef defines an AppleScript command "foo" that corresponds with this method.  In my main script, I'd like to do this...

foo
-- result: -[UtilityClass doFoo] is called

...instead of this...

call method "doFoo" --implemented by application's delegate, receiver implied
-- result: -[UtilityClass doFoo] is called

I hope my intention is now clear.  I was hoping that the answer would be "Yeah, that works automatically," but it seems to be "Maybe, if you get really clever with the build options."

Any ideas to make it easy?

Topher
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Re: Can I use self-defined terms in main script? (From: Matt Neuburg <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.