Results 1 to 2 of 2

Thread: [FIXED] CheckMenuItem still fires BeforeCheckChange event when events are suppressed

  1. #1
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33

    Default [FIXED] CheckMenuItem still fires BeforeCheckChange event when events are suppressed

    Simply look at the following method in CheckMenuItem:
    Code:
    public void setChecked(boolean state, boolean supressEvent) {
        if (!rendered) {
          this.checked = state;
          return;
        }
        MenuEvent me = new MenuEvent(parentMenu);
        me.item = this;
        if (fireEvent(Events.BeforeCheckChange, me)) {
          if (el().getParent() != null) {
            el().getParent().setStyleName("x-menu-item-checked", state);
          }
          checked = state;
          if (!supressEvent) {
            fireEvent(Events.CheckChange, me);
          }
        }
      }
    The BeforeCheckChange event is fired regardless of the value of supressEvent. It seems to me that ALL change events should be supressed if suppressEvent equals false. Unfortunately, this cannot be fixed by extending the class because the "checked" variable is private instead of protected.

    Let me know if you need any additional information, I'm glad to help!

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    Fixed in SVN.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •