Paso de parametros=20

Angel Lopez Muñoz lopez en esrf.fr
Mar Nov 16 09:42:05 CET 2004


Hola,

sería posible y correcto modificar los valores de las variables usr y mov 
de la clase cPrincipal dentro de cCaptura??

por ejemplo
supongamos:

cPrincipal
     self.usr='Usuaior Principal'
cCaptura
     self.usr=usr # tanto self.usr como usr son ='Usuaior Principal'

     self.usr=usr='Nuevo Usuario' # Modificaría esto la variable usr de 
CPrincipal???


Es esto la manera correcta de hacer esto???

Un saludo.



At 17:47 15/11/2004 -0600, you wrote:
>Yo lo hago de la siguiente manera:
>
>en la llamada a otro formulario
>
>class cPrincipal(wx.Frame):
>         .
>         .
>         captura = cCaptura(self.usr, self.mov, None, -1, "")
>         captura.ShowModal()
>
>donde self.usr y self.mov son mis variables del primer formulario.
>
>Y en la definicion del segundo formulario:
>
>class cCaptura(wx.Dialog):
>     def __init__(self, usr, mov, *args, **kwds):
>         self.usr = usr
>         self.mov = mov
>         # begin wxGlade: cCaptura.__init__
>
>No debes pober el "self" cuando pasas paramentro a otra funcion.
>
>
>
>----- Original Message -----
>From: FERNANDO VILLARROEL <fvillarroel en yahoo.com>
>To: python-es en aditel.org
>Date: Mon, 15 Nov 2004 13:47:52 -0800 (PST)
>
>Re:
>Re: Hola no logro pasar parametros o variables entre
>Re: formularios wxPython, se puede?, como se hace?
>Re:
>Re: Tengo el siguiente ejemplo
>Re:
>Re: class MyDialog1(wx.Dialog):
>Re:     def __init__(self, *args, **kwds):
>Re:         # begin wxGlade: MyDialog1.__init__
>Re:         kwds["style"] = wx.DIALOG_MODAL|wx.CAPTION
>Re:         wx.Dialog.__init__(self, *args, **kwds)
>Re:         self.label_3 = wx.StaticText(self, -1,
>Re: "AUTENTIFICACION USUARIOS")
>Re:         b=[]
>Re:         EVT_BUTTON (self, self.button_1.GetId(),
>Re: self.OnConectar)
>Re:         EVT_TEXT_ENTER (self,self.text_ctrl_1.GetId(),
>Re: self.OnEnt)
>Re:         EVT_TEXT_ENTER (self,self.text_ctrl_2.GetId(),
>Re: self.OnEnt1)
>Re:         EVT_BUTTON (self, self.button_2.GetId(),
>Re: self.OnSalir)
>Re:
>Re:
>Re: frame=MyFrame(self,b[2],-1,"CHEVALIER")
>Re: self.Centre(frame)
>Re: frame.Show()
>Re: self.Destroy()
>Re:
>Re: Luego la clase my frame que previamente importe con
>Re: from MyFrame import MyFrame
>Re:
>Re: class MyFrame(wx.Frame,):
>Re:     def __init__(self, suc, *args, **kwds):
>Re:         # begin wxGlade: MyFrame.__init__
>Re:         kwds["style"] = wx.DEFAULT_FRAME_STYLE
>Re:         wx.Frame.__init__(self, suc, *args, **kwds)
>Re:
>Re:
>Re: Me tira el siguiente error:
>Re:
>Re: raceback (most recent call last):
>Re:   File "conecta.py", line 94, in OnConectar
>Re:     frame=MyFrame(self,f,-1,"CHEVALIER")
>Re:   File "/home/developer/prueba/MyFrame.py", line 14,
>Re: in __init__
>Re:     wx.Frame.__init__(self, suc, *args, **kwds)
>Re:   File
>Re: "/usr/lib/python2.3/site-packages/wxPython/frames.py",
>Re: line 151, in __init__
>Re:     self.this = framesc.new_wxFrame(*_args,**_kwargs)
>Re: TypeError: String or Unicode type required
>Re:
>Re:
>Re: Por favor si alguien me puede ayudar no logro pasar
>Re: parametros entre formularios.
>Re:
>Re: Fernando Villarroel N.
>Re:
>Re:
>Re:
>Re: __________________________________
>Re: Do you Yahoo!?
>Re: The all-new My Yahoo! - Get yours free!
>Re: http://my.yahoo.com
>Re:
>Re:
>Re:
>
>Re:
>Re:
>Re: _______________________________________________
>Re: Python-es mailing list
>Re: Python-es en aditel.org
>Re: http://listas.aditel.org/listinfo/python-es
>Re:
>
>
>
>--------------------------------------------------
>Luis Antonio Lopez V.
>glav en mexico.com
>
>--
>_______________________________________________
>http://mail.mexico.com
>¡Disponible Ya! Utiliza el Outlook y Outlook Express para bajar tus 
>correos por solo US$24.95 al año
>
>Now available! Download your mail into your computer with Outlook and 
>Outlook Express US$24.95/yr
>
>Powered by www.M3xico.com
>_______________________________________________
>Python-es mailing list
>Python-es en aditel.org
>http://listas.aditel.org/listinfo/python-es




Más información sobre la lista de distribución Python-es