Problems with IEventReceiver in VB.NET

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Problems with IEventReceiver in VB.NET

Post by Silbermünze »

Hello everyone!

I am quite new to Irrlicht.net, though I am following the Irrlicht project for quite some time.

I recently started to play around with the sample VB.NET application and extend it with GUI elements, which finally lead me to writing my own eventReceiver class, which I derived from IEventReceiver in analogy to the C++ GUI example.

The declaration of the calss looks like:

Code: Select all

Imports Irrlicht
Imports Irrlicht.Core

class MyEventReceiver 
   Inherits IEventReceiver


end class
Unfortunately the IDE reports me that the inherit is uncorrect, with the following message: "Classes can only inherit from other classes". This brings up the thought to me that IEventReceiver seems not to be a class.

Has anyone successfully solved that problem in .NET?
Am I doing something obviously wrong, that I can't see?

Thanks in advance
Silbermünze
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Post by Silbermünze »

I have digged further into the problem and found out that this seems to be a VB.NET only problem. I managed to write a Event-handler class for C# which is functional without problems. Possibly something in the wrapper declaration of the IEventReceiver that VB.NET can't handle? Though this seems strange to me as the underlying runtime should be .NET in both cases and there should be no difference.

Silbermünze
Foole
Posts: 87
Joined: Mon Aug 29, 2005 10:08 am

Post by Foole »

Try:

Class MyEventReceiver
Implements IEventReceiver

IEventReceiver is an interface, not a class.
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Post by Silbermünze »

Thanks alot. That helped me out of my troubles so far.

Silbermünze
Locked