Index: pykoticon/trunk/tests/test.py
===================================================================
--- pykoticon/trunk/tests/test.py (revision 101)
+++ pykoticon/trunk/tests/test.py (revision 103)
@@ -35,5 +35,5 @@
     jobtitle = os.environ.get("PYKOTATITLE", "Unknown")
     jobsize = os.environ.get("PYKOTAPRECOMPUTEDJOBSIZE", "Unknown")
-    
+    billingcode = os.environ.get("PYKOTAJOBBILLING", "")
     if len(arguments) < 3 :
         message = """Hello %(username)s,
@@ -51,4 +51,11 @@
     server = xmlrpclib.ServerProxy("http://%s:%s" % (arguments[0], arguments[1]))
     result = server.showDialog(message, yesno)
+    """
+    result = server.askDatas(["Username", "Password", "Billing code"], \
+                             ["username", "password", "billingcode"], \
+                             {"username": username, \
+                              "password": "******", \
+                              "billingcode" : billingcode})
+    """                          
     print result # printing OK is safe.
         
Index: pykoticon/trunk/bin/pykoticon
===================================================================
--- pykoticon/trunk/bin/pykoticon (revision 102)
+++ pykoticon/trunk/bin/pykoticon (revision 103)
@@ -90,10 +90,10 @@
         return True
         
-    def export_askDatas(self, labels, varnames) :    
-        """Asks some textual datas defined by a list of labels and a list of variables' names."""
-        wx.CallAfter(self.frame.askDatas, labels, varnames)
+    def export_askDatas(self, labels, varnames, varvalues) :
+        """Asks some textual datas defined by a list of labels, a list of variables' names and a list of variables values in a mapping."""
+        wx.CallAfter(self.frame.askDatas, labels, varnames, varvalues)
         # ugly, isn't it ?
-        while self.frame.dialogAnswer is None :
-            time.sleep(0.1)
+        #while self.frame.dialogAnswer is None :
+        #    time.sleep(0.1)
         # TODO : add value extraction and return a mapping
         self.frame.dialogAnswer = None # prepare for next call, just in case
@@ -245,11 +245,17 @@
         dialog.Destroy()
         
-    def askDatas(self, labels, varnames) :
+    def askDatas(self, labels, varnames, varvalues) :
         """Opens a dialog box asking for data entry."""
         # use it this way : self.askDatas(["Username", "Password", "Billing code"], ["username", "password", "billingcode"])
+        frame = wx.Frame(self, wx.ID_ANY, \
+               _("Enter PyKota information"), \
+               size = (-1, -1), \
+               style = wxPython.wx.wxDEFAULT_FRAME_STYLE \
+                     | wxPython.wx.wxSIZE_AUTO_HEIGHT \
+                     | wxPython.wx.wxSIZE_AUTO_WIDTH \
+                     | wxPython.wx.wxNO_FULL_REPAINT_ON_RESIZE)
         self.dialogAnswer = None
-        panel = wx.Panel(self, wx.ID_ANY)
         values = {}
-        sizer = wx.BoxSizer(wx.VERTICAL)
+        vsizer = wx.BoxSizer(wx.VERTICAL)
         for i in range(len(varnames)) :
             varname = varnames[i]
@@ -261,14 +267,16 @@
             labelid = wx.NewId()    
             varid = wx.NewId()
-            label = wx.StaticText(panel, labelid, label)
-            variable = wx.TextCtrl(panel, varid, "Blah !")
-            sizer.Add(label, flag=wx.ALIGN_CENTER | wx.ALL)
-            sizer.Add(variable, flag=wx.ALIGN_CENTER | wx.ALL)
-        okbutton = wx.Button(panel, wx.ID_ANY, "OK")    
-        sizer.Add(okbutton, flag=wx.ALIGN_CENTER | wx.ALL)
-        self.SetAutoLayout(True)
-        self.SetSizerAndFit(sizer)
-        self.Layout()
-        #panel.Destroy()
+            label = wx.StaticText(frame, labelid, label)
+            variable = wx.TextCtrl(frame, varid, varvalues.get(varname, ""))
+            hsizer = wx.BoxSizer(wx.HORIZONTAL)
+            hsizer.Add(label, 0, wx.ALIGN_CENTER | wx.ALIGN_RIGHT | wx.ALL, 5)
+            hsizer.Add(variable, 0, wx.ALIGN_CENTER | wx.ALIGN_LEFT | wx.ALL, 5)
+            vsizer.Add(hsizer, 0, wx.ALIGN_CENTER | wx.ALL, 5)
+        okbutton = wx.Button(frame, wx.ID_ANY, "OK")    
+        vsizer.Add(okbutton, 0, wx.ALIGN_CENTER | wx.ALL, 5)
+        frame.SetAutoLayout(True)
+        frame.SetSizerAndFit(vsizer)
+        frame.Layout()
+        frame.Show(True)
 
 class PyKotIconApp(wx.PySimpleApp):
