Re: "Cross-OS" scripts [...and managing large projects]
Re: "Cross-OS" scripts [...and managing large projects]
- Subject: Re: "Cross-OS" scripts [...and managing large projects]
- From: email@hidden
- Date: Wed, 14 Aug 2002 10:49:40 -0700
I've been doing some cross-os scripts of late, so here's what I've
discovered:
use colon-paths. they work on both, and your users probably already know
them, if they ever have to see them.
it's very annoying, but the X finder loses some functionality from the 9
finder. Things like "put away" disappear, and if you're developing on X,
you can't even put them in without resorting to raw events in code. The
only real solution is to develop literally on both platforms, saving on
each as you need.
It's nice, but know that X's finder also adds functionality. I just spent
the morning fixing a script that I wrote under X, thinking that it would
also work under 9. But 9 had added a convenience property that I had
sprinkled throughout my code, making it unusable on 9.
have a good error-catching system in place. Every function I write has a
try block as it's first statement, with all code inside. If I catch any
error, I tack on a bit of text to the message and pass it up. So each
function looks like this:
to doSomething()
try
--do something
on error errMsg
error "Error trying to do something: " & return & errMsg
end try
end doSomething
which means that, when (not if) something goes wrong during development,
you know exactly where it's happening. A sort of poor-man's backtrace.
If you're going to be talking between script objects, set up a decent
system for loading them. Mine was the best thing I could think of at the
time, but after having worked with it, I've decided it's not the best.
Think out how you want to instantiate objects, how you want to defien them,
and how you want them to die.
Make a common library. Use it for everything you're using in more than one
place. It will help, and when one of those functions goes wrong, there's a
single point of failure to fix.
If you have a lot of objects, make a good object hierarchy. After two weeks
of work, I thought of a much better way to do my current project. But now
it's too late. Think it out beforehand.
Well, I got a bit off-topic, but it's all the things that I wish I had
known two weeks ago when I started. Good luck!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Seth A. Roby
Scriptwriter Intern
"Life is like an exploded clown. It's really funny until you figure out
what just happened."
"Fox, Christopher B"
<christopher.fox@capitalone. To: "'email@hidden'"
com> <email@hidden>
Sent by: cc:
applescript-users-admin@list Subject: "Cross-OS" scripts
s.apple.com
08/14/2002 09:32 AM
I am in a position where I will be deploying a FileMaker
database on
FileMaker Pro Server 5.5 on Mac OS 9.2.2. This database will make extensive
use of embedded AppleScripts to control both the Finder and FileMaker. I
have discovered that these scripts will be run client-side. However, users
may access this database from either FMPro 5.5 on Mac OS 9.2.2 or on Mac OS
X.
Are there any pointers on writing AppleScripts that manipulate
the
Finder successfully whether they are run on Mac OS 9.2.2 or on OS X? I'm
referring most specifically to the differences in file path specifications.
A second, unrelated question. I recently posted a question
asking
whether or not it was possible to AppleScript XML-RPC and SOAP calls that
must pass through a proxy server that requires authentication, but received
no response. None of Apple's examples run properly through a proxy. Any
pointers?
Thanks for your help.
Christopher Fox
Senior Support Technician
Solicitations IT
Capital One
cel: 804-301-4117
tel: 804-967-1553
fax: 804-968-2052
**************************************************************************
The information transmitted herewith is sensitive information intended only
for use by the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.