Crash on button click in plugin dll
Posted: 15 May 2014, 19:44
Hello,
We have a plugin architecture for that we are adding plugin xaml root to mainwindow xaml. The plugin root is sent to plugin dll to access its components and events.
At core side:
At Plugin dll:
Now it gets valid button pointer n all but when we click on that it crashes in MouseButtonUp event in Noesis.dll (renderer). What could lead this crash?
Thanks.
We have a plugin architecture for that we are adding plugin xaml root to mainwindow xaml. The plugin root is sent to plugin dll to access its components and events.
At core side:
Code: Select all
Noesis::Gui::FrameworkElement* main_root = (Noesis::Gui::FrameworkElement*)(mUIRoot);
Noesis::Core::Ptr<Noesis::Gui::FrameworkElement> root =
Noesis::Gui::LoadXaml<Noesis::Gui::FrameworkElement>(xaml_filename.c_str());
panel->GetChildren()->Add((Noesis::Core::BaseComponent*) root.GetPtr());
renderFrame();
//Passing plugin xaml root to plugin dll
_plugin->setGuiRoot((Noesis::Core::BaseComponent*) root.GetPtr());Code: Select all
Noesis::Gui::FrameworkElement* p1_root = (Noesis::Gui::FrameworkElement*)root_;
Noesis::Gui::RadioButton* expand_patient_list_button = NsStaticCast<RadioButton*>
(p1_root>FindName("RadioExpandCaseLoader"));
expand_patient_list_button->Click() += MakeDelegate(this,&SetCaseLoaderGui::OnExpandPatientListButtonClicked);Thanks.