As a signed value, this would be "-1", which might mean that nothing was
selected...
just a guess.
Mikael De Bie wrote:
Hi,
Using an ItemListener, I wanted to know if the action that triggered the
listener was a selection or anything else. I don't find another way that
to find the value of oEvt.Selected returned when it's not a selection
and to verify that value.
The value returned is 65535. All is working fine now, but I wonder why
THAT value ?
Does someone know something about that ?
Here's the code of the CspListBoxListener::itemStateChanged method :
-----------------------------------------------------------------------
void CspListBoxListener::itemStateChanged( const awt::ItemEvent& oEvt )
throw ( RuntimeException )
{
//For an unknown reason, 65535 seems to be the value for a deselection
if(oEvt.Selected != 65535){
getDialog()->getAddonImpl()->setSelectedCsp(oEvt.Selected);
((SolverDialog*)getDialog())->updateButtonsState(oEvt.Selected);
}
}
------------------------------------------------------------------------
Thanks,
Mikael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]