<< scope_tab << scope_tab << "if(parent != null)\n"
<< scope_tab << scope_tab << scope_tab << "parent_ptr = parent.raw_handle;\n"
<< scope_tab << scope_tab << "handle = efl.eo.Globals._efl_add_internal_start(\"file\", 0, klass, parent_ptr, 1, 0);\n"
+ << scope_tab << scope_tab << "register_event_proxies();\n"
<< scope_tab << scope_tab << "if (init_cb != null) {\n"
<< scope_tab << scope_tab << scope_tab << "init_cb(this);\n"
<< scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << "handle = efl.eo.Globals._efl_add_end(handle, 1, 0);\n" // replace handle with the actual final handle
- << scope_tab << scope_tab << "register_event_proxies();\n"
<< scope_tab << scope_tab << "eina.Error.RaiseIfOccurred();\n"
<< scope_tab << "}\n"
<< (class_type == "class" ? "" : "*/")
<< scope_tab << scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << "handle = efl.eo.Globals.instantiate_start(klass, parent);\n"
+ << scope_tab << scope_tab << "register_event_proxies();\n"
<< scope_tab << scope_tab << "if (init_cb != null) {\n"
<< scope_tab << scope_tab << scope_tab << "init_cb(this);\n"
<< scope_tab << scope_tab << "}\n"
<< scope_tab << scope_tab << "handle = efl.eo.Globals.instantiate_end(handle);\n"
<< scope_tab << scope_tab << "efl.eo.Globals.data_set(this);\n"
- << scope_tab << scope_tab << "register_event_proxies();\n"
<< scope_tab << scope_tab << "eina.Error.RaiseIfOccurred();\n"
<< scope_tab << "}\n"
<< scope_tab << "///<summary>Destructor.</summary>\n"
Test.AssertEquals(sent_struct.Fstring, received_struct.Fstring);
}
+
+ public static void event_in_init_callback()
+ {
+ int received = 0;
+ int sent = 42;
+ test.ITesting obj = new test.Testing(null, (test.ITesting t) => {
+ t.EvtWithIntEvt += (object sender, EvtWithIntEvt_Args e) => {
+ received = e.arg;
+ };
+ });
+
+ obj.EmitEventWithInt(sent);
+
+ Test.AssertEquals(sent, received);
+ }
}
}