Hi,

I'm having a strange problem that affects only certain versions of ooo 3.1.1

In practice, having a listbox model, if you set the SelectedItems property, on some ooo version the itemStateChanged event of the ListBox is raised.

The problem does not affect OOo vanilla version (sun build) but affects the ooo packaged from Ubuntu.

you can test with the code below (you'll need to prepare a simple dialog with a listbox before)


Now, my question is:
what is the correct behaviour:
OOo by sun: the event is NOT raised if you modify the selection from the model but it is raised if the user modify the selection manually.

OOo Ubuntu 9.10: the event is alwais raised

IMHO the first is correct or at least is the most used, because I have never observed the second in old ooo versions.

thanks
Paolo M


REM  *****  BASIC  *****

Sub Main
oDlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
oDlg.Model.ListBox.StringItemList = Array(1,2,3,4,5)

'this line raises the event but only on certain versions
oDlg.Model.ListBox.SelectedItems = (Array(0)) '****

oDlg.execute
End Sub


'manually binded to the itemstateChanged event of the listbox
Sub ListBox_itemStateChanged(oEvent As Object)
        Print "halo!"
End Sub

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to