-#@ MODIF componuplet Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE
+# -*- coding: utf-8 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
-# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
-# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND
-# REDISTRIBUTION OF THIS FILE.
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
# ======================================================================
# Modules Python
import types
import panels
#
-__version__="$Name: V1_1p1 $"
-__Id__="$Id: componuplet.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $"
+__version__="$Name: $"
+__Id__="$Id: componuplet.py,v 1.8 2005/11/03 09:03:48 eficas Exp $"
#
myrepr = Repr()
self.nb.pack(fill = 'both', expand = 1)
self.nb.add("Valeurs",tab_text="Saisir valeurs")
self.makeValeurPage(self.nb.page('Valeurs'))
+ self.enlevebind()
+ self.creebind()
self.nb.setnaturalsize()
def makeValeurPage(self,page):
aide=self.gen_aide(obj)
if objet_mc.into != None :
l_choix=list(objet_mc.into)
- obj.set_valeur(l_choix[0],evaluation='non')
+ #obj.set_valeur(l_choix[0],evaluation='non')
+ obj.set_valeur(l_choix[0])
option=Pmw.OptionMenu (frame_valeur,
items = l_choix,
menubutton_width = 10,
entry.pack(side=Tkinter.LEFT,padx=1)
entry.bind("<Return>",
lambda e,obj=obj,s=self:s.valid_valeur(e,obj=obj))
+ entry.bind("<KP_Enter>",
+ lambda e,obj=obj,s=self:s.valid_valeur(e,obj=obj))
if i==0:entry.focus_set()
#aide = Tkinter.Label(frame_valeur, text = aide)
#aide.place(relx=0.5,rely=0.55,anchor='n')
def record_valeur(self,val=None,obj=None,mess='Valeur du mot-cl\351 enregistr\351e'):
"""
Enregistre val comme valeur de self.node.item.object SANS faire de
- test de validit\351
+ test de validité
"""
- obj.set_valeur(val,evaluation='non')
+ #obj.set_valeur(val,evaluation='non')
+ obj.set_valeur(val)
self.parent.appli.affiche_infos(mess)
- self.node.parent.verif()
- self.node.update()
+ #self.node.parent.verif()
+ #self.node.update()
def valid_valeur(self,e,obj=None,mess='Valeur du mot-cl\351 enregistr\351e'):
"""
Enregistre val comme valeur de self.node.item.object avec
- test de validit\351
+ test de validité
"""
valeur=e.widget.get()
e.widget.delete(0,Tkinter.END)
self.parent.appli.affiche_infos('Valeur du mot-cl\351 enregistr\351e')
e.widget.insert(0,obj.getval())
else:
- obj.set_valeur(anc_val,evaluation='non')
+ #obj.set_valeur(anc_val,evaluation='non')
+ obj.set_valeur(anc_val)
self.parent.appli.affiche_infos("valeur du mot-cl\351 non autoris\351e")
e.widget.insert(0,anc_val)
else:
e.widget.delete(0,Tkinter.END)
e.widget.insert(0,anc_val)
- self.node.parent.verif()
- self.node.update()
+ #self.node.parent.verif()
+ #self.node.update()
def gen_aide(self,obj):
return ""
def suppitem(self,item) :
raise "NUPLET"
- def verif_condition_bloc(self):
- return self.object.verif_condition_bloc()
-
import Accas
treeitem=NUPLETTreeItem
objet=Accas.MCNUPLET