finding the mousecolor in IOS

Howard Bornstein bornstein at designeq.com
Thu Jul 12 16:34:43 EDT 2012


I'm designing a an IOS app that makes extensive use of determining "the
mousecolor". Everything is working fine in my stack, but when I port it to
the simulator (or create the IOS app), the mousecolor only returns 0,0,0
regardless of where the mouse is.

I found some early posts from last year discussing this issue and they
conclude that the mousecolor can't be supported under IOS because there is
no way to determine which pixel is being specified (I guess because our
fingers are fatter than a single pixel).

However, this doesn't make sense. If you put this script into the card of a
stack and run it in the simulator (it also works in an actual IOS app), it
gives you the point your finger is pressing on the iphone:

*on* mousemove

    *put*  the mouseloc &&":"&& the mousecolor into fld "location"

*end* mousemove

However, the mousecolor, as I mentioned, is always black. Since LC can
determine a specific pixel (or at least aggregates the points you are
touching down to a specific pixel) it doesn't seem like there is any reason
it can't get the mousecolor under that pixel.

In addition, I found this comment in the release notes for IOS 4.5.3:

*release-17 (2010-12-01)*

**

*Fixed issue with 'the mouseColor' causing a crash*


This implies to me that the mousecolor is supported under IOS. So, has
anyone gotten this to work or has anyone found another way to get the
mousecolor for a point on an IOS screen?

-- 
Regards,

Howard Bornstein
-----------------------
www.designeq.com



More information about the use-livecode mailing list