[rdnzl-devel] RE: rdnzl-devel Digest, Vol 1, Issue 5

Edi Weitz edi at agharta.de
Fri Dec 24 20:48:51 UTC 2004


On Fri, 24 Dec 2004 10:59:49 -0600, "Francisco Rivera" <jfrivera56 at hotmail.com> wrote:

>> 1. You forgot to import the type "System.EventHandler" which you need.
>>    That's actually the cause for the error message - you should have
>>    checked the backtrace.  Add these two lines:
>>
>>     (import-type "System.EventHandler") 
>>     (use-namespace "System")
>
> I was using
>
> (import-types "System" "EventHandler")
> (use-namespace "System")
>
> but then the program cannot be compiled. The error was:
>
> Warning: Returning NULL object from .NET call
> Error: Type with name "System.EventHandler" not found in assembly "System,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
>   1 (abort) Return to level 0.
>   2 Return to top loop level 0.

The first argument to IMPORT-TYPES is the (short) name of an assembly,
not a namespace.  The .NET System.EventHandler is in the System
namespace but /not/ in the assembly named System.dll, it's in
Mscorlib.dll, so you have to use IMPORT-TYPE, not IMPORT-TYPES.

For details as to which type is in which assembly you need to consult
the .NET framework documentation which comes with Visual Studio .NET
but is also available online from microsoft.com.

Cheers,
Edi.




More information about the rdnzl-devel mailing list