Hi
I'm using always the same view which is created with a default document
I would like to know if I do it in the right way
When I load a new document=>
m_myView->Activate(true);
a2dDocviewGlobals->GetDocviewCommandProcessor()->FileClose ();
a2dDocviewGlobals->GetDocviewCommandProcessor()->CreateDocuments
(wxT("dummy"),wxDOC_NEW, FindDocTemplate(myDocTypeNameString));
Ok and in the connector =>
a2dViewTemplate* viewTpl =
a2dDocviewGlobals->GetDocviewCommandProcessor()->SelectViewType(
templateEvent.GetDocument(),
m_viewTemplates.size()?m_viewTemplates:a2dDocviewGlobals->GetDocviewCommandProcessor()->GetViewTemplates());
if ( !viewTpl )
{
wxLogMessage(wxT("No view available for this document") );
return;
}
else if(viewTpl->GetViewTypeName() == wxT("MyTypeView"))
{
m_notebook->SetPageText(m_notebook->GetPageIndex(m_myLayer),doc->GetTitle());
m_myView>SetDocument(doc);
a2dDocviewGlobals->GetDocviewCommandProcessor()->AddCreatedDocument(templateEvent.GetDocument());
m_myView->Activate(true);
}
I would like to know if it's right and to display a "would like to
save" dialog when creating a new doc and the previous one has been
modified
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev