Raise event error

I am getting a acompile error and I don't understand how to work through this. Can anyone enlighten me a bit? Here is the error from the compiler.

error C3728: 'event Mach4::IMyScriptObject_CodeEventHandler

and here is the code
1
2
3
4
5
6
7
8
9
void programinit(){
	Mach4::CMach4DocClass obj;
	
	obj.Code("G20");
	obj.Code("G53G90G40");
	obj.Code("F1");
	obj.Code("M06 T0 F",IPM(),".");
	rapidheight();
}
closed account (zb0S216C)
You're gonna' need to provide more information than that. What's the full error?

Wazzak
Last edited on
Here is the full error:

1>c:\users\office\documents\visual studio 2008\projects\presetter\presetter\PlugInControlDialog.h(1133) : error C3728: 'event Mach4::IMyScriptObject_CodeEventHandler ^Mach4::CMach4DocClass::Code': event does not have a raise method

This is a dll that has a windows form and I have added the exe as a reference to the project. The exe exposes a namespace of Mach4 and the class CMach4DocClass. This is visible in the object browser of the solution. There are also a bunch of eventhandlers exposed in the Mach4 namespace and the IMyScriptObject_CodeEventHandler is one of them.

This error is in the .h file of the Windows form of the dll.

Last edited on
closed account (zb0S216C)
Well, the error clearly states that the class Mach4::CMach4DocClass::Code doesn't have an associated member function called raise(). You need to add the function to the class.

Wazzak
Topic archived. No new replies allowed.