#13378 closed defect (fixed)
ToolBarButton - Meaning of select() method is reversed
Reported by: | Ming Zhe Huang | Owned by: | ykami |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | DojoX Mobile | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
The meaning of select() method is reversed. When writing the following code to deselect a toolbar button, actually we're selecting it.
toggleBtn.select(false); try to deselect, but actually select
Check ToolBarButton.js line 58, the passed in parameter name is "deselect". I think it should be renamed as "select".
Change History (4)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Milestone: | tbd → 1.7 |
Status: | new → assigned |
Thanks, I agree. The API was not good. It has to be consistent.
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [25736]) Fixes #13378 !strict Made the select API consistent. TabBarButton? and ToolBarButton? had select(Boolean), while ListItem? had select/deselect. Added deselect to TabBarButton? and ToolBarButton?. The boolean argument for select() is still valid to keep backward compatibility.
BTW, the meaning of ToolBarButton?.selected is also reversed here. That will cause trouble if there's need to check that flag.