mouseLoc OS X strangeness

David Beck davethebrv at mac.com
Wed Jun 18 04:36:01 EDT 2003


Hey,

I have noticed that on Mac OS 9 using rev 1.1 when you have a menubar in the
stack and it is set to display in the Mac OS menubar instead of in the stack
window, the mouse coords have an origin of (0,21) instead of (0,0), meaning
that the top left pixel in the stack window has coord (0,21). This pertains
to button locations as well as the mouseLoc function.

In Mac OS X, however, the button locations still have origin of (0,21), but
the mouseLoc function has an origin of (0,13), meaning that when the
mouseLoc function is called with the mouse over the top left pixel of the
stack window, the function returns "0,13". This threw me off for a while but
I eventually I sorted it out and rewrote up my scripts accordingly. However,
I have now distributed my stack and am getting reports from end users that
they are having problems which lead me to believe that only SOMETIMES the
mouseLoc function origin is (0,13) in OS X, and sometimes it is (0,21). What
gives with this? What is the rhyme and reason here? Is there a work around?

Thanks,

Dave




More information about the use-livecode mailing list