views:

28

answers:

0

I have an Objective C program, and I'm trying to add scriptability. I have read the docs, and I've seen the SimpleScripting examples. so, I have two questions:

1) Am I correct in saying that every (non-standard) command is going to need it's own class to respond to that command? And that class will probably only have one method.

2) What is the accepted way of having that class communicate with the rest of the program? if I want the command to tell my application to save, for example, how does the script object know about the object to send messages to? I can see making my NSApplication class set a global gApplication = this, and then do everything through that, but that seems kind of kludgy...