tim_faron
11 years agoContributor
can i catch an property or method not supported error and continue
In my application I am dealing with a NavTree which is a Windows .NET Application.
I want the user to specify the node in the Tree to select and if the node is expandable just expand it but not have them have to know if expand is required or not.
At the highest level, there is no method to know if a node is expanded or not .. and I would have to institute some complex logic to dig deep into the object ...
In my function i want to do the following:
---
Tree.ExpandItem("items");
--- If it fails I want to then just call
Tree.ClickItem("items");
and then continue on ...
The problem is ExpandItem in some cases will throw "method or property not supported error so a try / catch will not work .. I know about OnLogError event but that will not continue my script.
Any suggestions on what I might be able to do.
I want the user to specify the node in the Tree to select and if the node is expandable just expand it but not have them have to know if expand is required or not.
At the highest level, there is no method to know if a node is expanded or not .. and I would have to institute some complex logic to dig deep into the object ...
In my function i want to do the following:
---
Tree.ExpandItem("items");
--- If it fails I want to then just call
Tree.ClickItem("items");
and then continue on ...
The problem is ExpandItem in some cases will throw "method or property not supported error so a try / catch will not work .. I know about OnLogError event but that will not continue my script.
Any suggestions on what I might be able to do.