Error in FindContainingWorkspace(WorkItem,View)

Mar 7, 2011 at 2:09 PM
Edited Mar 7, 2011 at 2:11 PM

While I was looking to see if I can capture when the User closes the application with the Red X or ALT F4 I was walking through the code and found in the Proctected sub CloseView()   

 

the VIEW segment would have this message

"Infrastructure.Interface.Presenter`1' was used with the wrong number of generic arguments in assembly"

The application seems to work fine but I'm concerned that this may be an issue that may come back later and haunt me, any suggestions?

 

Also If anyone knows how I can caputre the closing of the application from both the OnFileExit and the Red X  so I can check for dirty data prior to closing the appication that would be helpful.

 

thanks

Sorry I should mention that I'm using GP 2008. 

Dim wks As IWorkspace = locator.FindContainingWorkspace(WorkItem, View)

Developer
Mar 9, 2011 at 1:57 PM

Hi,

In case that message is displayed even when using the generic class with the right number of arguments, the cause for that could be related to the known issue described in the following thread:

Inheriting from a generic class

The thread describes an issue in Visual C++ 2005, but there might be a similar issue in Visual Basic 2008. In that case, you could try with Visual Basic 2010 to see if the error persists.

As for the approaches for checking if your views are dirty before closing, you might find the following resources useful:

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi