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: Paul Skinner <email@hidden>
- Date: Mon, 16 Jun 2003 10:03:02 -0400
On Monday, June 16, 2003, at 05:33 AM, John Delacour wrote:
At 12:50 am -0700 16/6/03, Michelle Steiner wrote:
I maintain that within dothis, text item delimiters should be saved
and restored.
And I (and apparently David) maintain that it's a waste of code
because provided text item delimiters are set, if necessary, every
time immediately before using them, there is no possibility of error.
These all to frequent discussions about text item delimiters always go
round in circles and get nowhere. Let people do as they please and
take the consequences.
JD
Since when has that ever happened on this list? 'Round these parts we
tell 'em every damn thing and then let them listen to us argue it back
and forth for a week. In the end there's usually a generally agreed
upon generalization and set of exceptions. Until the next time it comes
up.
While there has been great debate in the past as to the value of this
store/reset practice. It comes down to this simple fact...
There are cases where not restoring them will cause problems in your
code. There are NO cases where storing/restoring will cause problems in
your code.
If you store and restore the TIDs nothing bad will come of it. If you
don't store and restore them then USUALLY nothing bad will come of it,
given proper diligence to set immediately before using them. There are
cases, however, where you cannot set the TIDs immediately before you
use them.
You need examples?
Nest a pair of handlers. Now, try to shove a 'set tids to newtids' in
there between them. Now what if the handlers have calls to other
handlers within them? What if one of them is SUPPOSED to change the
TIDs?
So, do you want perfectly reliable code or do you not?
Paul Skinner
_______________________________________________
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.