Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse class bug?




On May 27, 2005, at 9:40 AM, Cameron Hayne wrote:

On 27-May-05, at 9:28 AM, Elliotte Harold wrote:


System.out.println(java.awt.MouseInfo.getNumberOfButtons());


On the Apple page <http://developer.apple.com/releasenotes/Java/ Java50RN/2_ResolvedIssues/chapter_3_section_3.html>, I see the following:
-------------------------
Radar #4008177
MouseInfo.getNumberOfButtons Return Values


Description:

MouseInfo.getNumberOfButtons is a new class in J2SE 5.0 that returns information about the number of mouse buttons.

Resolution:

Because Mac OS X can have multiple mice connected and in use, as well as using Universal Preferences instead of the mouse, MouseInfo.getNumberOfButtons is generally inapplicable. Thus, it always returns 0.

I remember seeing that in the release notes and thinging, "That's just dumb." An implementation that seems much more reasonable would return either the number of buttons on the mouse/trackpad with the least number of buttons (currently 1 for any Mac I can think of) or the the number for the device with the most number of buttons (e.g. 3 on my powerbook with a three-button USB mouse connected).


The value of 0 is simply likely to make things fail that shouldn't fail. I.e. What is software that requires at least one mouse button supposed to do?

Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Mouse class bug? (From: Elliotte Harold <email@hidden>)
 >Re: Mouse class bug? (From: Cameron Hayne <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.