# clear study
salome.myStudy.Clear()
+# init study
+salome.myStudy.Init()
+
# find SALOMEDS component by its type
scomponent = FindComponent("MyComponent")
PyObject *pyCont = PyDict_GetItemString(globals, "pyCont");
PyObject *result = PyObject_CallMethod(pyCont,
(char*)"create_component_instance",
- (char*)"ssl",
+ (char*)"ss",
aCompName.c_str(),
instanceName.c_str());
const char *ior;
PyObject *pyCont = PyDict_GetItemString(globals, "pyCont");
PyObject *result = PyObject_CallMethod(pyCont,
(char*)"create_component_instance",
- (char*)"ssl",
+ (char*)"ss",
genericRegisterName.c_str(),
instanceName.c_str());
const char *ior;
// Activate the objects. This tells the POA that the objects are ready to accept requests.
PortableServer::ObjectId_var aStudy_iid = root_poa->activate_object(aStudy_i);
aStudy = aStudy_i->_this();
- namingService.Register(aStudy.in(), "/Study");
+ namingService.Register(aStudy, "/Study");
// Assign the value of the IOR in the study->root
CORBA::String_var IORStudy = orb->object_to_string(aStudy);
{
for (ObsListIter it (myObservers.begin()); it != myObservers.end(); ++it)
{
- if ( it->first->_is_equivalent(theObs) ) {
- myObservers.erase( it );
- break;
- }
+ if ( it->first->_is_equivalent(theObs) ) {
+ myObservers.erase( it );
+ break;
+ }
}
}
{
SALOMEDS::Locker lock;
if (_closed)
- throw SALOMEDS::Study::StudyInvalidReference();
+ return;
//delete the builder servant
PortableServer::POA_var poa=_builder->_default_POA();
PortableServer::ObjectId_var anObjectId = poa->servant_to_id(_builder);
_impl->setNotifier(0);
delete _notifier;
delete _genObjRegister;
+ _notifier = NULL;
_closed = true;
}