Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Am 11.07.2017 um 15:34 schrieb Michael Stahl:
On 09.07.2017 12:51, jan wrote:

ERROR: However, when I call treeControl.expandNode(someNode), (someNode
being a [3])I get the following error:

com.sun.star.uno.RuntimeException: unsatisfied query for interface of
type com.sun.star.awt.tree.XTreeControl! (Error during invoking function
[… callstack…]

I assumed, since the TreeControl has the method, the data model in the
one that is set for the TreeControl and XMutableTreeNode inherits from
XTreeNode, I should be able to do what I tried above.

i suspect you're calling this:

void SAL_CALL UnoTreeControl::expandNode( const Reference< XTreeNode >&
xNode )
{
    Reference< XTreeControl >( getPeer(), UNO_QUERY_THROW
)->expandNode(xNode);
}

getPeer() returns UnoControl::mxPeer and that is created on-demand by a
couple of other functions; i'm assuming it is null in your case?

Good question – I can't tell. I am using the API from python (sorry, I
think I forgot to say, so one could only guess from the code) and
debugging python I don't get to see what happens "inside" the C++
function. I might be able to understand the problem better, if I read
the code snippet you posted though I hoped I could stay on the pyUNO
level :-)

Thanks for the pointer!

Jan


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.