Pasar valores entre Frames

Luis Antonio Lopez V. glav en aaadam.com.mx
Mar Dic 13 20:47:35 CET 2005


Mario Lacunza escribió:
> Mira es asi como lo hago yo:
>
> import frmGeo
>
> ab=frmGeo.create(None)
> ab.Show()
> var=ab.GeneraUbigeo()
>
> y me da error....alguna idea??
>
> Estoy trabajando con Boa Constructor.
>
>   

Pero como tienes definido el Frame en frmGeo y que error te manda?

Para que funcione debe ser algo parecido a esto:


class create(wx.Frame):
    def __init__(self, *args, **kwds):
        .
        .
        .
    def GeneraUbigeo(self):
        .
        .
        .

> 2005/12/13, Luis Antonio Lopez V. <glav en aaadam.com.mx>:
>   
>> Realmente no los tengo en los mismos archivos, los puse asi para
>> simplificar, pero en realidad los tengo en diferentes modulos, por
>> ejemplo Buscar:
>>
>> import DButil as dbu
>>
>> buscar = dbu.Buscar("usuario", None, -1, "")
>> usuario = buscar.usr
>>
>>
>>
>> Mario Lacunza escribió:
>>     
>>> Hola Luis,
>>>
>>> Gracias por responder, pero lo q veo en tu codigo es q todo se encuentra
>>> dentro del mismo archivo .py, yo me refiero cuando los frames se crean
>>>       
>> en
>>     
>>> distintos archivos .py.
>>>
>>> Es decir : frmMain.py llama a frmSecun.py, este procesa y devuelve un
>>> mivar=dato, como hago para obtener el valor de frmSecun.mivar desde el
>>> frmMain??
>>>
>>> Gracias!!
>>>
>>> 2005/12/13, Luis Antonio Lopez V. <glav en aaadam.com.mx>:
>>>
>>>       
>>>> Yo lo hago de esta forma:
>>>>
>>>> class cPrincipal(wx.Frame):
>>>>     def __init__(self, usr, *args, **kwds):
>>>>         self.usr = usr
>>>> .
>>>> .
>>>> .
>>>> # end of class cPrincipal
>>>>
>>>>
>>>> class MyApp(wx.App):
>>>>     def OnInit(self):
>>>>         wx.InitAllImageHandlers()
>>>>         vPrincipal = cPrincipal("usuario", None, -1, "")
>>>>         self.SetTopWindow(vPrincipal)
>>>>         vPrincipal.Show(1)
>>>>         return 1
>>>>
>>>> # end of class MyApp
>>>>
>>>> if __name__ == "__main__":
>>>>     app = MyApp(0)
>>>>     app.MainLoop()
>>>>
>>>>
>>>> y para un wx.Dialog es igual:
>>>>
>>>> class Buscar(wx.Dialog):
>>>>     def __init__(self, usr, *args, **kwds):
>>>>         self.usr = usr
>>>>
>>>> buscar = Buscar("usuario", None, -1, "")
>>>>
>>>>
>>>> --
>>>>
>>>>         
>>> Saludos / Best regards
>>>
>>> Mario Lacunza
>>> Desarrollador de Sistemas - Webmaster
>>> Desarrollador 2 Estrellas  VS2005
>>>
>>> Email: mlacunza [AT] gmail [DOT] com
>>> Website: http://mlacunzav.cogia.net
>>> Blog: http://mlacunza.blogspot.com/
>>> Lima - Peru
>>> _______________________________________________
>>> Python-es mailing list
>>> Python-es en aditel.org
>>> http://listas.aditel.org/listinfo/python-es
>>>
>>>
>>> Correo entrante escaneado contra la presencia de Virus!!!!
>>>
>>> Gerencia Centro de Cómputo
>>> A.A.A.D.A.M. A.C.
>>>
>>>       
>>
>> Correo entrante escaneado contra la presencia de Virus!!!!
>>
>> Gerencia Centro de Cómputo
>> A.A.A.D.A.M. A.C.
>>
>>
>> AVISO DE CONFIDENCIALIDAD: Este correo electrónico puede contener
>> información que es confidencial, privilegiada, personal o bien estar
>> legalmente prohibida su publicación. Si usted no es el receptor designado,
>> por este medio se le notifica que no está autorizado a leer, imprimir,
>> retener, copiar o divulgar, cualquier parte de él o de sus anexos. Si usted
>> ha recibido este mensaje por error, favor de borrarlo totalmente así como
>> sus anexos sin leer su contenido y notificar inmediatamente a quien lo
>> envía. Quien lo envía no tiene intención de desistirse a cualquier
>> privilegio respecto a la confidencialidad de este comunicado. Ninguna
>> información aquí contenida debe ser entendida como dada o avalada por la
>> A.A.A.D.A.M., A.C., sus empleados o asociados, salvo cuando ello
>> expresamente se indique. Es responsabilidad de quien recibe este correo
>> asegurarse que esté libre de virus, por lo tanto, la A.A.A.D.A.M., A.C. ni
>> sus empleados y asociados acepta responsabilidad alguna.
>>
>>
>> CONFIDENTIALITY NOTICE: This electronic mail transmission may contain
>> information that is confidential, privileged, proprietary, or otherwise
>> legally exempt from disclosure. If you are not the intended recipient, you
>> are here by notified that you are not authorized to read, print, retain,
>> copy or disseminate this message, any part of it, or any attachments. If you
>> have received this message in error, please delete this message and any
>> attachments from your system without reading the content and notify the
>> sender immediately of the inadvertent transmission. There is no intent on
>> the part of the sender to waive any privilege, which may attach to this
>> communication. Any information in this message shall not be understood as
>> given or endorsed by A.A.A.D.A.M., A.C., their employees or members,
>> unless expressly so stated. It is the responsibility of the recipient to
>> ensure that this email is virus free, therefore neither A.A.A.D.A.M., A.C.,
>> nor their employees and members accept any responsibility.
>>
>> _______________________________________________
>> Python-es mailing list
>> Python-es en aditel.org
>> http://listas.aditel.org/listinfo/python-es
>>
>>
>>
>>     
>
>
> --
> Saludos / Best regards
>
> Mario Lacunza
> Desarrollador de Sistemas - Webmaster
> Desarrollador 2 Estrellas  VS2005
>
> Email: mlacunza [AT] gmail [DOT] com
> Website: http://mlacunzav.cogia.net
> Blog: http://mlacunza.blogspot.com/
> Lima - Peru
> _______________________________________________
> Python-es mailing list
> Python-es en aditel.org
> http://listas.aditel.org/listinfo/python-es
>
>
> Correo entrante escaneado contra la presencia de Virus!!!!
>
> Gerencia Centro de Cómputo
> A.A.A.D.A.M. A.C.
>   



Correo entrante escaneado contra la presencia de Virus!!!!

Gerencia Centro de Cómputo
A.A.A.D.A.M. A.C.


AVISO DE CONFIDENCIALIDAD: Este correo electrónico puede contener información que es confidencial, privilegiada, personal o bien estar legalmente prohibida su publicación. Si usted no es el receptor designado, por este medio se le notifica que no está autorizado a leer, imprimir, retener, copiar o divulgar, cualquier parte de él o de sus anexos. Si usted ha recibido este mensaje por error, favor de borrarlo totalmente así como sus anexos sin leer su contenido y notificar inmediatamente a quien lo envía. Quien lo envía no tiene intención de desistirse a cualquier privilegio respecto a la confidencialidad de este comunicado. Ninguna información aquí contenida debe ser entendida como dada o avalada por la A.A.A.D.A.M., A.C., sus empleados o asociados, salvo cuando ello expresamente se indique. Es responsabilidad de quien recibe este correo asegurarse que esté libre de virus, por lo tanto, la A.A.A.D.A.M., A.C. ni sus empleados y asociados acepta responsabilidad alguna.


CONFIDENTIALITY NOTICE: This electronic mail transmission may contain information that is confidential, privileged, proprietary, or otherwise legally exempt from disclosure. If you are not the intended recipient, you are here by notified that you are not authorized to read, print, retain, copy or disseminate this message, any part of it, or any attachments. If you have received this message in error, please delete this message and any attachments from your system without reading the content and notify the sender immediately of the inadvertent transmission. There is no intent on the part of the sender to waive any privilege, which may attach to this communication. Any information in this message shall not be understood as given or endorsed by A.A.A.D.A.M., A.C., their employees or members, unless expressly so stated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither A.A.A.D.A.M., A.C., nor their employees and members accept any responsibility.
------------ próxima parte ------------
_______________________________________________
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