Hello,<div><br></div><div>I have converted the method setControlProperty in UnoDialog: <a href="http://opengrok.libreoffice.org/xref/components/wizards/com/sun/star/wizards/ui/UnoDialog.java#149">http://opengrok.libreoffice.org/xref/components/wizards/com/sun/star/wizards/ui/UnoDialog.java#149</a></div>
<div>as follow: </div><div><br></div><div><div> def setControlProperty(self, ControlName, PropertyName, PropertyValue):</div><div> try:</div><div> if PropertyValue:</div><div><br></div><div> if self.xDialogModel.hasByName(ControlName) == False:</div>
<div> return</div><div> xPSet = self.xDialogModel.getByName(ControlName)</div><div> if isinstance(PropertyValue,tuple):</div><div> uno.invoke(xPSet, "setPropertyValue", (PropertyName, uno.Any( \</div>
<div> "com.sun.star.beans.PropertyValue",PropertyValue)))</div><div> else:</div><div> xPSet.setPropertyValue(PropertyName, PropertyValue)</div><div><br></div>
<div> except Exception, exception:</div><div> traceback.print_exc()</div></div><div><br></div><div>but I get this Exception:</div><div><br></div><div><div> File "/usr/lib/python2.6/dist-packages/uno.py", line 249, in invoke</div>
<div> return pyuno.invoke( object, methodname, argTuple )</div><div>com.sun.star.uno.RuntimeException: value is not of same or derived type!</div></div><div><br></div><div>as vmiklos told me in IRC the third parameter of invoke should be a tuple of PropertyValue but in the Java code the variable PropertyValue is a Bool or a list of strings.</div>
<div><br></div><div>Anybody knows can I solve it ?</div><div><br></div><div>Greetings</div><meta http-equiv="content-type" content="text/html; charset=utf-8">