I’m not certain this is the right term or question.
Basically I have a fairly complex asobjc project that I have been working on.
Rather than having one applescript file within the project, with thousands of lines of code I need to find a better solution.
Problems that I can’t yet figure out however…
I currently am using the main app delegate to receive senders from buttons etc… and firing functions in different files… is there a better way than this?
on someButton:sender
tell current application's otherApplescriptFile to doSomething()
end someButton
Almost… is it possible to have multiple app delegates in the .xib
I attempted to create a new object, give it the class of “otherApplescriptFile”… no such luck
Is there a way to have globals across all applescript files within a project? I am currently passing values back and forth via return and it’s quite troublesome.
You can make an instance of your other class and have a property that is an outlet for it. That way you’re calling instance methods rather than class methods all the time: a little less typing, and the ability to store values in the other classes if needed. But it won’t change things drastically.
Not multiple app delegates, but certainly multiple class objects. Drag in an NSObject blue cube, change its class to your class, then make an outlet for it in your app delegate. That said, having a single controller object per .xib file is generally the preferred arrangement.