how I update the fields ?

fernando brasil <[email protected]>
Newsgroups gmane.comp.ide.boa-constructor.user
Message-ID <[email protected]>
The not dumb form the values, but the function work successfully. 
 
See my source code:
# form one
    def OnGridSearchGridCellLeftDclick(self, event):
        """ Function that catches the code of the customer and orders for
the form customers """
        
        import Customer
        customer = Customer.DialogCustomer(self)
        row = event.GetRow()
        
        if customer.IsActive():
            _code = self.gridSearch.GetCellValue(row, 0)
            customer.receiveSearch(_code)            
        self.Destroy()
 
 
# form two
    def receiveSearch(self, code):
        """ Function that receive the value of gridSearch and fill the
fields of form """
        self.intctrlCode.SetValue(code)
        value = self.intCtrlCode.GetValue()        
 
        # here I print the value that came of form one
        print value 
        try:
            _sql = """
                    SELECT cli_codigo, cli_nome, cli_cnpj FROM cliente WHERE
cli_codigo = %s
                   """ % (self.intCtrlCode.GetValue())
            self.cursor.execute(_sql)
            registers = self.cursor.fetchall()         
            for x in registers:
                self.textCtrlName.SetValue(x["cli_nome"])
                self.textCtrlCNPJ.SetValue(x["cli_cnpj"])            
        except MySQLdb.Error, e:
            wx.MessageBox("Error %d: %s" %(e.args[0], e.args[1]))          
        finally:
            self.intCtrlCode.Update()
            self.textCtrlName.Update()
            self.TextCtrlCNPJ.Update()

 
The function, receiveSearch is executed successfully, but the fields:
intCtrlCode and others do not modify the values.
 
Any idea ? 

-- 
View this message in context: http://www.nabble.com/how-I-update-the-fields---tp17405975p17405975.html
Sent from the BoA Constructor - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.