incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120458] [PyUNO] freeze on calling methods of method node of Basic (basprov::BasicMethodNodeImpl)
Date Fri, 03 Aug 2012 17:26:36 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120458

--- Comment #2 from hanya <hanya.runo@gmail.com> ---
Here is the workaround: 

def get_list_of_macros(ctx, sp):
    introspection = create(ctx, "com.sun.star.beans.Introspection")
    macros = []
    for lib_node in sp.getChildNodes():
        print(lib_node.getName())
        for module_node in lib_node.getChildNodes():
            print(module_node.getName())
            for method_node in module_node.getChildNodes():
                d = None
                inspected = introspection.inspect(method_node)
                idl_getName = inspected.getMethod("getName", -1)
                idl_getPropertyValue = inspected.getMethod("getPropertyValue",
-1)
                name, d = idl_getName.invoke(method_node, ())
                uri, d = idl_getPropertyValue.invoke(method_node, ("URI",))
                macros.append((name, uri))
                #macros.append(method_node.getName(),
method_node.getPropertyValue("URI"))
    return macros

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message