Hello, today another problem ^^

I encounter a problem with a "else:" and a cmds.textField

I just write this simple code :

pathForText = projectPathPreview + "Comments/" +selectedCharacterPreview + 
".txt"

if os.path.exists(pathForText):
        self.commentPreview(pathForText)
else:
      print "NOPE"
      cmds.textField(self.widgets["Info"],edit =True,text= "No comments")

commentPreview execute a command :
            cmds.textField(self.widgets["Info"],edit =True,text= "Comments 
bla bla bla")

the if statement is working correctly and my function display the right 
message in my textField
Print "Nope" is also working

But cmds.textField(self.widgets["Info"],edit =True,text= "No comments") 
return me an error "# Error: KeyError: file /code.py line 550: Info

Is it possible that the cmds,textFields can not be performed inside an else 
statement ? 


-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to