Remove QChangeEvent from QListBox?

thread: 4 messages  |  last: a year ago  |  started: tuesday, march 2, 2010, 1:39 am pst


#1  |  comradwt (Santa Monica, CA) United States of America
Tuesday, March 2, 2010, 1:39 AM PST

When I change the selected value of a list box, the QChangeEvent continues to fire.  How does one remove this event from the control?  I have removed all add actions from the control and it's still firing.  For example, I have the following:


class UserInformationPanel extends QPanel {

public function lstDateFormat_Create()
  {
    $this->lstDateFormat = new QListBox( $this );
    $this->lstDateFormat->AddItem( 'mm/dd/yyyy', 'm/d/Y' );
    $this->lstDateFormat->AddItem( 'dd/mm/yyyy', 'd/m/Y' );
    $this->lstDateFormat->AddItem( 'dd.mm.yyyy', 'd.m.Y' );                               
    
  }

  ...

}

-Conrad

#2  |  comradwt (Santa Monica, CA) United States of America
Tuesday, March 2, 2010, 1:48 AM PST

This is issue hasn't been resolved by commenting out Format_Change method and going to the previous page.  It seems that the save will not happen if I do not have an event connected to the button.  However, when I do, the change event will be fired and I do not want this type of functionality.

-Conrad

#3  |  Patrick Ranger (Montreal, Qc) Canada
Tuesday, March 2, 2010, 11:11 AM PST

You could try $this->lstDateFormat->RemoveAllActions('onchange'), but you're problem is most likely elsewhere since this is not a normal behavior. Do you have other actions on this control? Or on the panel, or any other action that could be responsible?

#4  |  comradwt (Santa Monica, CA) United States of America
Thursday, March 4, 2010, 6:14 PM PST

Patrick, I have decided to leave this QChangEvent in the application because the previous developer used Ajax which didn't require a save button.  Thus, I really don't have a lot of time to refactor his code and meet my deadline.

Thanks again,

-Conrad



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.