Author: derek Date: Mon Nov 6 22:09:32 2006 New Revision: 160 Modified: sofaswitch/trunk/callflow/src/callflow.cpp sofaswitch/trunk/callflow/src/death.cpp sofaswitch/trunk/callflow/src/requestnode.cpp sofaswitch/trunk/callflow/src/shapelist.cpp Log: get the close down to work correctly (I think) Get the requesting of a node to work, particularly when passing additional information. Requesting of a node works when supplied text is a string (with quotes) or consists of python variables. Modified: sofaswitch/trunk/callflow/src/callflow.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/callflow.cpp (original) +++ sofaswitch/trunk/callflow/src/callflow.cpp Mon Nov 6 22:09:32 2006 @@ -309,7 +309,7 @@ toolBar->AddTool(wxH_FILEOPEN, wxBitmap ( FileOpen_xpm ), wxT("open a file")); toolBar->AddTool(wxH_FILESAVE, wxBitmap ( FileSave_xpm ), wxT("Save to the current file")); toolBar->AddTool(wxH_FILESAVE__AS, wxBitmap ( FileSave_As_xpm ), wxT("Save to the file you specify")); - toolBar->AddTool(wxH_FILEE_XIT, wxBitmap ( FileE_xit_xpm ), wxT("")); + toolBar->AddTool(wxH_FILEE_XIT, wxBitmap ( FileE_xit_xpm ), wxT("End this program now")); toolBar->AddTool(wxH_CONTROLSCOMPILE, wxBitmap ( compile_xpm ), wxT("Compile to code")); toolBar->AddSeparator() ; Modified: sofaswitch/trunk/callflow/src/death.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/death.cpp (original) +++ sofaswitch/trunk/callflow/src/death.cpp Mon Nov 6 22:09:32 2006 @@ -52,9 +52,10 @@ file.AddLine(" \"\"\"Terminate processing of this flow chart, by closing this particular connection. "); file.AddLine(" \"\"\" "); file.AddLine(" if self.isMaster: "); - file.AddLine(" reactor.disconnectAll() "); + file.AddLine(" reactor.stop() "); file.AddLine(" else: "); file.AddLine(" self.transport.loseConnection() "); + file.AddLine(" self.keepGoing = False "); file.AddLine(" return None "); file.AddLine(" "); Modified: sofaswitch/trunk/callflow/src/requestnode.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/requestnode.cpp (original) +++ sofaswitch/trunk/callflow/src/requestnode.cpp Mon Nov 6 22:09:32 2006 @@ -27,7 +27,7 @@ SetSize(newSize); displayData[displayData.size()] = - InformationSection(wxT("Request node from (Python code)"), wxT("voip")); + InformationSection(wxT("Request node from (Python code)"), wxT("\"voip\"")); displayData[displayData.size()] = InformationSection(wxT("Timer period (seconds)"), wxT("1")); @@ -47,7 +47,8 @@ { DrawCompileError(dc); dc.SetPen(*wxBLACK_PEN); - + dc.SetBrush(wxBrush(*wxBLACK, wxSOLID)); + wxPoint p1(m_rect.GetPosition()); wxPoint pA(p1.x + 25, p1.y + 0); wxPoint pB(p1.x + 25, p1.y + 50); @@ -79,9 +80,12 @@ file.AddLine(" eName = self.data[a][\"Timer label\"] "); file.AddLine(" self.pendingEvents[eName] = a "); file.AddLine(" reactor.callLater(self.data[a][\"Timer period\"], self.timerObjectExpired, eName)"); - file.AddLine(" rhost = self.data[a][\"Request node from (Python code)\"] "); - file.AddLine(" rhost += \":REQUESTNEWID \" "); - file.AddLine(" rhost += eval(self.data[a][\"Additional info (Python code)\"]) + \"\\0\" "); + file.AddLine(" rhost = self.data[a][\"Request node from\"] "); + file.AddLine(" rhost = eval(rhost) + \":REQUESTNEWID \" "); + file.AddLine(" additional = self.data[a][\"Additional info\"] "); + file.AddLine(" if len(additional) > 0: "); + file.AddLine(" rhost += eval(additional) "); + file.AddLine(" rhost += \"\\0\" "); file.AddLine(" self.transport.write(rhost) "); file.AddLine(" return self.data[a][\"Output\"] "); file.AddLine(""); Modified: sofaswitch/trunk/callflow/src/shapelist.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/shapelist.cpp (original) +++ sofaswitch/trunk/callflow/src/shapelist.cpp Mon Nov 6 22:09:32 2006 @@ -494,15 +494,22 @@ file.AddLine(" queue. On doing this, spark an event to drive queue processing. "); file.AddLine(" Note that this method can only deal with certain predefined "); file.AddLine(" types of messages "); - file.AddLine(" \"\"\" "); - file.AddLine(" thisMessage = thisMessage.strip() "); - file.AddLine(" for msg in self.knownNetworkMessages: "); - file.AddLine(" if thisMessage.find(msg) >= 0: "); - file.AddLine(" pMsg = str(thisMessage).split(\" \") "); - file.AddLine(" eName = pMsg[0].replace(\":\",\"\") "); - file.AddLine(" self.networkEventData(eName, pMsg[1]) "); - file.AddLine(" "); - file.AddLine(" "); + file.AddLine(" \"\"\" "); + file.AddLine(" thisMessage = thisMessage.strip() "); + file.AddLine(" for msg in self.knownNetworkMessages: "); + file.AddLine(" if thisMessage.find(msg) >= 0: "); + file.AddLine(" idx = thisMessage.find(\":\") "); + file.AddLine(" msga = thisMessage[0:idx] + thisMessage[(idx+1):] "); + file.AddLine(" idx = thisMessage.find(\" \") "); + file.AddLine(" if idx < 0: "); + file.AddLine(" eName= msga "); + file.AddLine(" body=\"\" "); + file.AddLine(" else: "); + file.AddLine(" eName = msga[0:idx] "); + file.AddLine(" body = thisMessage[(idx+1):] "); + file.AddLine(" self.networkEventData(eName, body) "); + file.AddLine(" "); + file.AddLine(" "); for (int i = 0; i < DndShape::KnownShapes; i++) { DndShape *thisShape; if (i == DndShape::None)
participants (1)
-
SofaSWITCH SVN