Commits

Cédric Bonhomme committed 78d2b5d

Resolved bug at login (line 219 of clientAgent.py).

Comments (0)

Files changed (3)

source/clientAgent.py

         """
         """
         cooking_template = spade.Behaviour.ACLTemplate()
-        cooking_template.setOntology(self.myAgent.ontology)
+        cooking_template.setOntology(self.ontology)
         mt = spade.Behaviour.MessageTemplate(cooking_template)
         # Add the behaviour WITH the template
         receive_messabe_behaviour = self.ReceiveMessage()

source/simpleGui.py

         # File menu
         filemenu = Menu(self.menu, tearoff = 0)
         self.menu.add_cascade(label = "File", menu = filemenu)
-        filemenu.add_command(label = "Connect to platform", \
+        filemenu.add_command(label = "Connect to the SPADE platform", \
                                 command = self.connect_to_platform)
-        filemenu.add_command(label = "Disconnect from platform", \
+        filemenu.add_command(label = "Disconnect from the SPADE platform", \
                                 command = self.disconnect_from_platform)
         filemenu.add_separator()
         filemenu.add_command(label = "Signin", command = self.signin)
             msg.destroy()
 
 
+        if self.client_agent == None:
+            self.show_info('Not connected to the SPADE platform.')
+            return
+
         msg = Toplevel(self.master)
         msg.title('Signin')
         msg.resizable(height = False, width = False)
 
             msg.destroy()
 
+        if self.client_agent == None:
+            self.show_info('Not connected to the SPADE platform.')
+            return
+
         msg = Toplevel(self.master)
         msg.title('Login')
         msg.resizable(height = False, width = False)

source/spade/user_db.xml

Binary file modified.