mouseLoc OS X strangeness

Sarah sarahr at genesearch.com.au
Wed Jun 18 17:27:00 EDT 2003


I had problems using the Little Arrows object (as supplied in the 
Object Library) because sometimes they worked fine and other times, no 
matter where I clicked, I could only increase the value, never 
decrease. I think this is fixed in Rev 2 although I haven't tested it 
much.

With the arrows, the workaround was quite easy. Just check to see 
whether the mouse location is within the object clicked and react 
accordingly. e.g.
   if the mouseV < the top of me then put the mouseV + 26 into mV
   else put the mouseV into mV
Perhaps you could implement similar checks and fixes in your scripts.

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/
On Wednesday, June 18, 2003, at 07:33  pm, David Beck wrote:

> 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