Re: best practice with helper AppleScript - another solution
Re: best practice with helper AppleScript - another solution
- Subject: Re: best practice with helper AppleScript - another solution
- From: Kenneth Ferry <email@hidden>
- Date: Tue, 01 Jul 2003 15:55:09 -0400
Hi Matt, thanks for the help. I have a few questions though.
>
Also there are many types of result that your code cannot return; it just throws up its hands.
If the return is not of a special type, I just return the NSAppleEventDescriptor itself, same as NSAppleScript does. Is there something else I should be doing? On the other hand, there are many types of parameters that my code cannot pass as a parameter. I'll fix it so that it passes raw NSAppleEventDescriptors through untouched (rather than passing their descriptive text as a string). That way any kind of argument can be given, if encoded as a descriptor.
>
If your goal is to call a handler in a script,
>
in such a way that you can pass it parameters, you can load it and call it
>
from an NSAppleScript. Suppose, for example, we have a script like this:
>
>
to divide from x by y
>
return x / y
>
end divide
>
>
Kenneth Ferry's example can't deal with that syntax.
Just Ken is fine by the way. :) Anyway, I'm trying to avoid having to compile scripts at runtime. If you needed to call a handler of this sort, would it not be more effective to write the handler
on my_divide(x,y)
return divide from x by y
end my_divide
and then pass it parameters via apple events at runtime?
Thanks in advance,
Ken
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.