Exception during setting of properties

P

Paul K

I am finishing up work on a custom treeview control that has a Nodes
property. Each TreeNode in the collection also has a Nodes property.

If I add any nodes to a root level node with the designer, a null reference
exception is thrown. The tags for the nodes are created correctly.

This exception is not thrown at runtime. I also have made sure to wrap any
access to runtime-only objects in if blocks to prevent their access during
design.

I'm not sure what (if any) code may be helpful in resolving the problem, but
my main question is: Does anyone know of a way to get a stack trace at
design time for a custom component? The null reference exception message in
a message box doesn't really help me in trying to track down and eliminate
the bug.

Any help would be greatly appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,085
Members
48,773
Latest member
Kaybee

Latest Threads

Top