Call functions between classes/scripts

Hi

I’m doing an ASOC-app which has 4 different “parts”.
These parts are seperated vibibly with a NSTabView.

Now, instead of having all the code in one single .applescript-file (the appdelegate), I would like to have five .applescript files.

the AppDelegate.applescript main file (with all the code thats true for all parts, like what to do when the app quites, etc).
then the four .applescripts per part.

I started every file with a “script webcamtab” and property parent: class “NSObject”, created four new Objects in interface builder, and assigned each new class the a new object.

it works so far, that i can assign the IBActions and IBOutlets, but i can’t use a function declared in appdelegate in the webcamtab for example and vice-versa.

would it be better instead of creating new “script …” use some kind of include on the appdelegate and use just one class?

What you’re proposing will work fine. The key to being able to call handlers in other scripts is that you have to use Objective-C naming conventions, with underscores and so on. You also have to coerce bot the results and the parameters passed. If you look around here, you’ll see it’s been discussed in detail before.