Hi Matt,

in your code below, is the "editor" smartpointer null? Maybe your "editorInput" equals the editor input from the QmitkStdMultiWidget (using operator==) ? The docs about the "OpenEditor" methods explain when a new editor is opened and in which case an existing editor is reused.

Using IWorkbench::GetEditorRegistry()::FindEditor(id) (pseudo-code) you could double-check if your editor was registered in the extension registry.

Best,
Sascha

On 10/03/2011 05:52 PM, Clarkson, Matt wrote:
Hi there,

I have created my own editor class, and want to contain my own widgets (a bit like QmitkStdMultiWidgetEditor uses QmitkStdMultiWidget).
However, I can't seem to get it to be created. Im trying things like:


berry::IEditorPart::Pointer editor = this->GetSite()->GetPage()->OpenEditor(editorInput, MyEditor::EDITOR_ID, false); berry::SmartPointer< MyEditor > multiViewEditor = editor.Cast< MyEditor >();


But the editor.Cast fails.
Is this the right way to go about it?

I have my editor class stored in the src folder of a common plugin (uk.ac.ucl.cmic.gui.qt.common). I have registered the editor in the plugin.xml and as a BlueBerry Extension.
I have also created a preference page, and that is visible.
But I can't access it from a view, and the constructor does not appear to be called?????

Alternatively, if anyone can point to where exactly the QmitkStdMultiWidgetEditor gets instantiated, I could probably copy the principal.

Many thanks

Matt


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to