Re: Odd result parsing keychain password
Re: Odd result parsing keychain password
- Subject: Re: Odd result parsing keychain password
- From: Graff <email@hidden>
- Date: Sun, 07 Dec 2003 04:39:44 -0500
I was thinking more along the lines of setting them in one function,
calling another function from there for some reason, setting them and
then clearing them in the called function, and then returning to the
calling function with the delimiters cleared. Yes it is an unlikely
set of circumstances but why not be safe and just save, set, use,
restore.
- Ken
On Dec 7, 2003, at 4:30 AM, Paul Berkowitz wrote:
On 12/6/03 9:20 PM, "Graff" <email@hidden> wrote:
"characters 1 thru x" returns the individual characters as a list,
while "text 1 thru x" returns a text string of those characters. I'm
willing to bet that somewhere else in the script you changed the
AppleScript text-item delimiters to ":" so when you coerced the list
of
characters into a text string it placed the ":" between each letter.
This is why you should always grab the text-item delimiters before you
use them, save them into a variable, and then reset them when you are
done using them. You avoid these kind of troubles down the line.
Actually, don't tell anyone, but that's what can actually create just
these
problems if you're not very careful. Somewhere along the way the
delimiter(s) is/are set to something you don't _really_ want to
perpetuate,
but then you keep resetting them to the same thing (":" or suchlike)
every
time you're done. On the other hand, if you just reset the delimiters
to
{""} when you're done, you won't have these problems: if you make the
mistake once, at least you fix it next time. The supposed situation
that
there are some ongoing non-default delimiters which have to be reset is
entirely theoretical: it never happens. In fact, the best policy is
simply
to set the delimiters to whatever you want any time you coerce a list
to
text - then it doesn't matter even if you've "inherited" some faulty
code
from someone else where the delimiters were left in a peculiar state.
Just
set them - to whatever they should be - including {""} if that's what
you
need and expect - and you can never go wrong. Bill Fancher was right.
Don't
depend on the last person (and what "last person" would that be
anyway?) to
have done it for you: do it yourself.
_______________________________________________
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.