PythonCard

Luis Mario Meraz mario.meraz en gmail.com
Dom Mar 6 19:35:48 CET 2005


Hola estoy moviendole aqui al PythonCard, pero por alguna razon no me
ejecuta los eventos, ya vi el codigo y le eh movido por todos lados, y
es algo muy sencillo, alguien me puede ayudar?

No puedo hacer que incrementar el valor.

El ejemplo esta tomado de su manual y aqui esta como lo tengo:

------ counter.py

#!/usr/bin/python

"""
__version__ = "$Revision: 1.10 $"
__date__ = "$Date: 2004/04/24 22:13:31 $"
"""

from PythonCard import model

class Minimal(model.Background):
    def on_menuFileExit_select(self,event):
        self.close()
        
def on_incrBtn_mouseClick(self, event):
    startValue = int(self.components.field1.text)
    endValue = startValue + 1
    self.components.field1.text = str(endValue)

if __name__ == '__main__':
    app = model.Application(Minimal)
    app.MainLoop()



----------- counter.rsrc.py  -------------------------- este es el modelo

{'application':{'type':'Application',
          'name':'Counter',
    'backgrounds': [
    {'type':'Background',
          'name':'bgcounter',
          'title':u'Counter PythonCard Application',
          'size':(301, 260),
          'statusBar':1,

        'menubar': {'type':'MenuBar',
         'menus': [
             {'type':'Menu',
             'name':'menuFile',
             'label':'&File',
             'items': [
                  {'type':'MenuItem',
                   'name':'menuFileExit',
                   'label':'E&xit\tAlt+X',
                   'command':'exit',
                  },
              ]
             },
         ]
     },
         'components': [

{'type':'Button', 
    'name':'incrBtn', 
    'position':(20, 30), 
    'size':(89, -1), 
    'label':'Increment', 
    },

{'type':'TextField', 
    'name':'field1', 
    'position':(135, 20), 
    'size':(150, 35), 
    'alignment':'center', 
    'editable':False, 
    'font':{'faceName': u'Geneva', 'family': 'sansSerif', 'size': 24}, 
    'text':'42', 
    },

] # end components
} # end background
] # end backgrounds
} }
------------ 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