Re: Expanding Nodes in TreeControl, yields Error: "unsatisfied query for interface…
mstahl at redhat.com
Tue Jul 11 13:34:54 UTC 2017
On 09.07.2017 12:51, jan wrote:
> ERROR: However, when I call treeControl.expandNode(someNode), (someNode
> being a )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 >&
Reference< XTreeControl >( getPeer(), UNO_QUERY_THROW
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?
if that is the cause of the problem, i'm not familiar with dialog APIs,
so i don't know what the best way is to ensure the "peer" is created in
time; there is a "createPeer" function there in XControl fwiw.
More information about the LibreOffice