Changeset 3366 in Sophya for trunk/SophyaPI/PIext/pisiadw.cc


Ignore:
Timestamp:
Oct 30, 2007, 1:57:40 PM (18 years ago)
Author:
ansari
Message:

Tentative pour regler le probleme de blocage de piapp suite a affichage de la fefenetre de gestion d'objets.

1/ Protection dans NamedObjMgr() pour eviter deadlock de mutex (ds NamedObjMgr::UpdateObjMgrWindow() en particulier)
2/ Introduction de la classe SOpExObj (fichier piacmd.h .cc) pour execution d'operations sur objets, initiees depuis la boucle d'evts, dans un thread separe.

Reza , 30/10/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pisiadw.cc

    r2778 r3366  
    7272{
    7373PIWindow::Show();
    74 string cdir;
    75 dap->ObjMgr()->GetCurrentDir(cdir);
    76 cdir = '/' + cdir;
    77 dirlist->SetValueStr(cdir);
    78 dap->ObjMgr()->UpdateObjMgrWindow( GetCurDirId() );
    79 return;
    80 }
    81 
     74dap->ObjMgr()->UpdateObjMgrWindow( -1 );
     75return;
     76}
     77/* --Methode-- */
     78void ObjMgrWind::Hide()
     79{
     80dap->ObjMgr()->SetObjMgrWindowVisibility(false);
     81PIWindow::Hide();
     82return;
     83}
    8284
    8385/* --Methode-- */
     
    122124if (nom.length() < 1)  return;
    123125
     126string cmd;
    124127switch (msg)
    125128  {
    126129  case 10:
    127     {
    128     string cmd = "set cobj " + nom ;
    129     cout << " Setting current object ($cobj) to " << nom << endl;
    130     dap->CmdInterpreter()->Interpret(cmd);
    131     }
     130    cmd = "SCO " + nom;
    132131    break;
    133132  case 20:
    134     om->DisplayObj(nom);
     133    cmd = "DIS " + nom;
    135134    break;
    136135  case 30:
    137     om->PrintObj(nom);
     136    cmd = "PRT " + nom;
    138137    break;
    139138  case 40:
    140     if (dap->mPpfout)  om->SaveObj(nom, *(dap->mPpfout), false);
     139    cmd = "SAV " + nom;
    141140    break;
    142141  case 50:
    143     om->DelObj(nom);
    144     //    objlist->DeleteItemMsg(objlist->GetSelection());
    145     //    dap->ObjMgr()->UpdateObjMgrWindow(dirlist->GetValue()-30000);
     142    cmd = "DEL " + nom;
    146143    break;
    147144
     
    150147    break;
    151148  }
    152     
     149 dap->getSOpExObj()->AddOpe(cmd);    
    153150return;
    154151}
     
    158155{
    159156if (!Visible()) return;
    160 if (did != GetCurDirId() )  return;
     157if ( (did >0) &&(did != GetCurDirId()) )  return;
    161158dap->ObjMgr()->UpdateObjMgrWindow(did);
    162159return;
Note: See TracChangeset for help on using the changeset viewer.