Re: Setting Pages Insertion point (was Setting TextEdit S( )
Re: Setting Pages Insertion point (was Setting TextEdit S( )
- Subject: Re: Setting Pages Insertion point (was Setting TextEdit S( )
- From: Michelle Steiner <email@hidden>
- Date: Fri, 28 Sep 2007 13:18:53 -0700
On Sep 28, 2007, at 12:55 PM, Christopher Nebel wrote:
Is there an actual difference between an empty selection and no
selection?
That depends on what you mean by both of those, but assuming my
definitions, I would say yes. An "empty selection" means that the
start and end positions are the same, so it contains no characters,
*but it still has a location*, which means that using it as a
reference point for "before" or "after" is meaningful. If there is
"no selection", then there isn't even a location.
It makes sense when you look at it that way. Some applications
return "" when nothing is selected, but others return the position of
the insertion point.
Are there any meaningful differences between null, {}, and missing
value? FWIW, "null = empty value" returns false.
Well, the fact that "null" is exposed in AppleScript is really a
bug, so I'm going to ignore that one.
OK. So we shouldn't use it?
Even so, there are meaningful differences between {} and "missing
value", and not just because they're fundamentally different types
-- there are operations that will work on one that won't work on
the other, such as "set end of x to y".
I know; I tossed that one in, in order to have three. <g>
-- Michelle
--
Only in in the USA do they have a General in charge of the post
office and a Secretary in charge of defense.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden