Re: Unusual calling script problem
Re: Unusual calling script problem
- Subject: Re: Unusual calling script problem
- From: Shane Stanley <email@hidden>
- Date: Tue, 23 Dec 2014 13:27:05 +1100
On 23 Dec 2014, at 12:18 pm, Brian Christmas <email@hidden> wrote:
I was using the same property names in both AppDelegate and OddNSods, but even now that I’ve changed the OddsNSods variable names (there’s only 2 that were the same), I’m still getting an empty return.
And you'll keep getting errors until you stop. You can't use properties inside a method called as a class method, full stop. As I keep telling you, classes don't have properties -- instances do. You're doing the equivalent of asking the NSString class how long some instance of it is, instead of asking the instance itself. You know that makes no sense, you're just not making the connection that this is attempting to do the same thing. Think classes and instances, not scripts.
If I’m supposed to use a different method of calling setPathToMMFolderOAS:temp then I’m at a loss on how to understand what to do.
You have to address an instance of the OddsNSods, not the class itself. if you don't already have one, it means either creating one using alloc()'s init() and storing it in a property of the calling script, or doing it in the interface by dragging in a blue cube, changing its class to your class, and making a connection to a property that way. Whatever, there has to be an instance, and you need to talk to that instance. I know you’re trying to get me to understand the concept, but I’m the sort of person, once again, who learns by seeing concrete examples, and they’re few and far between on the net regarding calling one script from another.
You're *not* calling one script from another. You're calling a method on a class or an instance. There's no point seeing sample code if you think you're just calling a script -- it won't tell you anything.
|
_______________________________________________
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