Yes, it was null.
Thanks, I get the hang of it now. I created a new subclass of IEditorInput,
and then using that was able to instantiate my editor (currently doesn't do
much, but it launches).
So thanks for help.
I just need to be able to bring it to the front at the right time.
Thanks again,
Matt
On 6 Oct 2011, at 11:38, Sascha Zelzer wrote:
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 of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users