Posted 18 years ago
by Jake Pearson
-
Software Developer,
Alion Science and Technology
Hi,
I am adding in some unit tests (using NUnit) that create the various editors of my application. To make the tests as close to reality as possible, I want to host each editor in a DocumentWindow in a DockManager. The problem is that when I activate the DocumentWindow an InvalidOperationException is thrown with the message "Drag drop registration failed". The same exception happens in the SyntaxEditor. I was able to avoid the exception with some code like this in my SyntaxEditor override:Overriding, various parts of the DockManager doesn't really seem possible. Is there another work around that you know of or could you add in something like it to TabbedMdiWindow for the next release?
thanks,
Jake
I am adding in some unit tests (using NUnit) that create the various editors of my application. To make the tests as close to reality as possible, I want to host each editor in a DocumentWindow in a DockManager. The problem is that when I activate the DocumentWindow an InvalidOperationException is thrown with the message "Drag drop registration failed". The same exception happens in the SyntaxEditor. I was able to avoid the exception with some code like this in my SyntaxEditor override:
public static bool Testing = false;
public override bool AllowDrop
{
get { return base.AllowDrop; }
set
{
if (Testing)
{
return;
}
base.AllowDrop = value;
}
}
thanks,
Jake