Re: Why is a-b not equal to ((source of a) -b) ?
Re: Why is a-b not equal to ((source of a) -b) ?
- Subject: Re: Why is a-b not equal to ((source of a) -b) ?
- From: bill fancher <email@hidden>
- Date: Tue, 3 Sep 2002 11:46:18 -0700
On Tuesday, September 3, 2002, at 12:36 AM, Timothy Bates wrote:
On Monday, September 2, 2002, at 06:26 PM, Timothy Bates wrote:
How come subtracting a large number from the result of getmillisec
(an
osax call under X 10.2) seems not to do the subtraction?
GetMilliSec -ms2
-->7.9489387E+7
--> (when it should be about "7" or similar small number
Bill said
Without parentheses, it thinks -ms2 is the target for the
GetMilliSec event (I haven't verified that)
Thanks for the reply, but what does that mean? How can "minus var1" be
a
target? What is a target?
A target is like the 'app "finder"' in a tell statement: the recipient
of the event generated by a command.
Is GetMilliSec - var1 being interpreted as GetMilliSec of var1? If
so, that
doesn't even make any sense, because var1 is a real number, and has no
idea
how to get milliseconds. Oh well. Live and forget, I guess.
Well, Finder "has no idea how to get milliseconds" either, but it does
so anyways. No reason a number couldn't do the same thing. I thought it
was perhaps being interpreted as
tell someNumber
GetMilliSec
end tell
but testing reveals that that gets a runtime error (though one might
argue that it SHOULD work, just like "tell {{a:1,b:2,c:3}} to items
whose a is 1" SHOULD work).
To convince yourself that GetMilliSeconds will eat what follows as a
"parameter" of some sort, though, try:
GetMilliSec "spud"
That isn't limited to GetMilliSec. If you've got Jon's commands, try:
the ticks {1, 2, 3}
Looking at the event that is sent in the first case:
MSec\MSec{ ----:"spud", &subj:'null'(), &csig:65536 }
we see that "spud" is sent as the direct object, even though
GetMilliSec doesn't take a direct object.
I'm sure Christopher Nebel could unravel the details for us.
--
bill
tim
_______________________________________________
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.