<div> </div><div>  Hello,</div><div><br></div><div>There is more "fun" with kdevplatform:</div><div><br></div><div>The following code:</div><div><br></div><div>KDevelop::IDocumentFactory * fact = m_core->documentController()->factory("application/x-circuit");<br>
</div><div>qDebug() << "factory = " << fact ;<br>   <br> KUrl emptyDoc( i18n("Untitled") ); <br> KDevelop::IDocument *mydoc = fact->create( emptyDoc, m_core);<br>    qDebug() << "document: " << mydoc ;<br>
<br>  qDebug() << "document mime comment: " << mydoc->mimeType()->patterns() ;<br></div><div><br></div><div>IComponentDocument *doc = dynamic_cast<IComponentDocument*>( mydoc );</div><div>
ISimulator *sim = m_simManager->simulatorForDocument(doc, "transient");<br></div><div><br></div><div>produces the following output:</div><div><br></div><div>QDEBUG : KTechLab::AddComponentsTest::addResistor() factory =  0x88d6ba8 <br>
</div><div>QDEBUG : KTechLab::AddComponentsTest::addResistor() document:  0x8ac5298 <br></div><div>QDEBUG : KTechLab::AddComponentsTest::addResistor() document mime comment:  ("*.bin") </div><div>QDEBUG : KTechLab::AddComponentsTest::addResistor() qttest(14918) KTechLab::SimulationManager::simulatorForDocument: no factory found for docoument type  "application/octet-stream"  and simulation type:  "transient" </div>
<div><br></div><div>So an empty document created by the circuit factory has the mime-type of application/octet-stream. This is very bad.</div><div><br></div><div>How should we create new circuit documents? Have to check temporary file with .circuit extension.</div>
<div><br></div><div>  Zoltan</div><div><br></div>