To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=113291 Issue #|113291 Summary|framework: gridcontrol methods of css.awt.grid.XGridDa |taListener of the listener added through addDataListen |er method do not visible from python Component|framework Version|OOO330m1 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|ui Assigned to|mba Reported by|hanya
------- Additional comments from [email protected] Tue Jul 20 14:25:56 +0000 2010 ------- I tried to implement customized grid data model for the grid control in Python. But methods of css.awt.grid.XGridDataListener added by the addDataListener method are not accessible through python, this means these method can not be called through Invocation. I could them using css.reflection.XIdlMethod interface taken by css.reflection.CoreReflection service. I have tried to implement the same data model in Java and they can be called without any problems. Here is the part of attached file: def addDataListener(self, listener): self.listeners.append(listener) #return print("GridCustomDataModel::addDataListener is called") print(listener) print(dir(listener)) print("rowAdded method is visible :%s" % ("rowAdded" in dir(listener))) import uno try: uno.invoke(listener, "rowAdded", ()) except Exception as e: print(e) """inspected = self.ctx.getServiceManager().createInstanceWithContext( 'com.sun.star.beans.Introspection', self.ctx).inspect(listener) methods = inspected.getMethods(-1) method_names = [method.getName() for method in methods] method_names.sort() print(method_names)""" idl_class = self.ctx.getServiceManager().createInstanceWithContext( 'com.sun.star.reflection.CoreReflection', self.ctx).getType(listener) idl_method = idl_class.getMethod("rowAdded") if idl_method: print("rowAdded method can be invoked") else: print("rowAdded method is unvisible.") the line print("rowAdded method is visible :%s" % ("rowAdded" in dir(listener))) shows False. but "rowAdded method can be invoked" is shown. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
