Re: Starting out with adding Applescript support to my Cocoa app (basic question about the best script interface)
Re: Starting out with adding Applescript support to my Cocoa app (basic question about the best script interface)
- Subject: Re: Starting out with adding Applescript support to my Cocoa app (basic question about the best script interface)
- From: HORUS Technologies <email@hidden>
- Date: Fri, 22 Jul 2005 19:43:07 +0200
Le 22 juil. 05 à 17:50, Adam Holt <email@hidden> a écrit :
Based on this, would your approach be:
1. To support two parameters and catch a standard Applescript command,
(...)
2. Create a new command with two parameters, so from script I would
call it
Definitely option 2.
I would suggest also to swap the order of the parameters of the
command so it
sounds (and reads) more natural, maybe:
tell application "MyApp"
send message "This is the message" to host
"192.168.123.1:4444"
end tell
But it's (almost? ;-)) nitpicking...
Hope this helps,
Olivier
Date: Fri, 22 Jul 2005 16:09:29 +0100
From: Adam Holt <email@hidden>
Subject: Starting out with adding Applescript support to my Cocoa app
(basic question about the best script interface)
To: Cocoa Dev <email@hidden>
Message-ID: <BF06CAB9.FCC4email@hidden>
Content-Type: text/plain; charset="US-ASCII"
I've been playing for a little while with trying to get
Applescriptability
into my existing Cocoa app.
So far, I've found the experience quite frustrating despite reading
numerous
threads, Apple docs, and online comments on the subject.
I'm rewinding my efforts back to the beginning however, and my
question is
actually a fundamental one to do with the best approach to take for
the
interface...
The only thing I wish to make scriptable in my app is the ability
to set two
text parameters and say "go" (the application's main task in life
is to send
a message over HTTP, so one parameter is the address and the other
parameter the message body).
There is never any need to be able to read these parameters from
Applescript
and nor does it make sense to be able to set them without telling
the app at
the same time to perform message sending function.
Based on this, would your approach be:
1. To support two parameters and catch a standard Applescript command,
e.g.
RUN, so from script I would call it like:
tell application "MyApp"
set address to "192.168.123.1:4444"
set message to "This is the message"
run
end tell
OR
2. Create a new command with two parameters, so from script I would
call it
like:
tell application "MyApp"
sendmsg to "192.168.123.1:4444" message "This is the message"
end tell
Ideas welcome please!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden