On 2/2/11 1:32 PM, Ed Leafe wrote: > On Feb 2, 2011, at 4:12 PM, Jacek Kałucki wrote: > >> def isMouseLeftDown(): >> - return wx.GetMouseState().leftDown >> + if wx.VERSION< (2, 9): >> + return wx.GetMouseState().leftDown >> + else: >> + return wx.GetMouseState().leftIsDown > > > I really, really, really hate when software breaks like this. Why they > simply changed the wording of all these attributes with no change in behavior > is beyond me.
I agree that these types of changes shouldn't be made lightly, but in this case I think consistency wins (although they probably should have left the old name intact with a deprecation warning). The consistency I speak of is with wxMouseEvent, which has always had LeftDown/LeftIsDown and RightDown/RightIsDown, which mean different things, and the one with "Is" is more consistent with the MouseState object. """ NB: Note the difference between methods like LeftDown and LeftIsDown: the former returns true when the event corresponds to the left mouse button click while the latter returns true if the left mouse button is currently being pressed. For example, when the user is dragging the mouse you can use LeftIsDown to test whether the left mouse button is (still) depressed. """ So I see why they wanted to change it, and 2.9/3.0 probably seemed like the right time to break compatibility. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
