Created attachment 152769 [details] Connects to LO instance running as a server Currently when writing an UNO script it is very hard to figure out what methods/properties an object has. One needs to search for documentation, however some properties are not documented; and even if they were, it is much faster to just print everything an object provides in an interactive prompt. # Steps to reproduce 1. Download to current directory the attached script (it simply connects to libreoffice) 1. Run office as: soffice --calc --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager" 2. Run "python" to enter an interactive shell 3. Execute in python: exec(open("./connect-to-lo.py").read()) 4. Try printing the "model.CurrentController" object in such a way so you could see "ActiveSheet" field ## Expected There's a way to do it ## Actual There's no way to view properties of the object, including the "ActiveSheet" field.
UPDATE: I found 2 workarounds: 1. executing "dir(object_name)", e.g. "dir(model.CurrentController)" for the "steps to reproduce" seems to give properties and methods 2. forcing interactive python shell to autocomplete, e.g. by typing model.CurrentController. and pressing TAB twice, makes it to show the list too (and this list even shows methods and properties differently: methods ends up with "(" symbol). Possible gotcha: these workarounds are specific to python. So I'm not sure whether they can be qualified as a solution to the report.
mmm, using dir() is not a workaround, it's just the way to print the properties of an object in python. Other than that, you could also use an extension like MSI < https://extensions.libreoffice.org/extensions/mri-uno-object-inspection-tool > as an object inspector. Closing as RESOLVED NOTABUG