![]() |
help on save and save as methods
I've been working on this kind of text editor program and I can't figure out how to actually save the date entered into the editor with the save and saveas methods.
heres the two methods that I wrote using other examples from the wxPython site. :
heres the frame method which creates the text editor: :
the entire program file can be found here: notesprogram.txt |
:
f = open(os.path.join(self.dirname,self.filename),'w')What are you trying to do here? You write nothing to the file you just opened, then set self.text2 to the return value of f.write(). :
f = open(os.path.join(self.dirname,self.filename),'w')Similarily, what are you trying to do here? You're writing to the data file the return from the method "SetValue", which is NULL. That makes no sense to me. Presumably... you would want this instead: :
f = open(os.path.join(self.dirname,self.filename),'w')Why were you trying to set self.text2 to the value of itself anyways? |
okay! that does it :D thanks
|
| All times are GMT -5. The time now is 4:43 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC