Re: Why save text item delimiters? Philosophical question....
Re: Why save text item delimiters? Philosophical question....
- Subject: Re: Why save text item delimiters? Philosophical question....
- From: David Crowe <email@hidden>
- Date: Mon, 16 Jun 2003 10:03:41 -0600
Michelle;
You didn't really answer my question (even though you quoted it) ....
I understand that if you set the text item delimiters and assume that
they'll stay the same within a function, and call a bunch of
functions that might also set them ... that you would have problems.
But, another strategy is to set the text item delimiters and then use
them immediately being careful not to call any functions.
This strategy seems simpler, more efficient and less likely to result
in strange, hard to track down bugs (e.g. due to a deeply nested
function that doesn't correctly re-set the delimiters).
- David Crowe
Date: Sun, 15 Jun 2003 20:05:52 -0700
Subject: Re: Why save text item delimiters? Philosophical question....
From: Michelle Steiner <email@hidden>
To: email@hidden
On Sunday, June 15, 2003, at 03:09 PM, David Crowe wrote:
nother way to look at it is to pose the question: "Would you use the
text item delimiters without setting them to the needed value first?"
Um, because some other part of the code had set them, and expects them
to be what they were set to. If you change them underneath, you should
put them back the way you found them.
If the main body of the script set them, and you change them within a
handler (subroutine), you had better restore them to what they were
before exiting the handler because the main body may still be using
them.
_______________________________________________
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.