Cannot pass script object as parameter to run script
Cannot pass script object as parameter to run script
- Subject: Cannot pass script object as parameter to run script
- From: "email@hidden" <email@hidden>
- Date: Wed, 19 May 2010 13:39:51 +0100
It would seem that you cannot pass an ASObjC script object as a parameter to run script:
-- me is an NSObject subclass that responds to test()
set theScript to me
set expr to "on run {x} " & linefeed & "tell x to test()" & linefeed & "end" & linefeed
run script expr with parameters {theScript}
Presumably the problem arises because another component instance is created
and that instance baulks at the ASObjC-object as follow:
«class ocid» id «data kptr50FE2101» doesn’t understand the test message
Creating a copy of the theScript and passing that dispels the error but the test() handler is not called.
Coercing to as script has no effect.
It would also appear that regular script definitions, ie: those that are not subclasses of NSObject
also cannot be successfully utilised as run script parameters.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden