3 Oct 2004 05:32
Storing structured, 'widget-specific-data', then loading it back in la ter
Chris Nethery <clnethery <at> juno.com>
2004-10-03 03:32:06 GMT
2004-10-03 03:32:06 GMT
Hello everyone!
I have been working on the following for a while and just cannot get it to work correctly, so I am hoping that
someone could offer some advice.
I am trying to create a group of (re-usable) methods that take user input data and store it for future
reference, then reload it later to the same widget where it was originally created. I wrote the following
program to try to get the process working. The first button is supposed to store the data, and the second
button is meant to plug the data back into the widget. I seem to be having difficulty plugging the data back
into the widget, because I cannot identify it(the widget) properly. Any thoughts?
Thanking you in advance,
Chris Nethery
import marshal
import Tkinter
import Pmw
root = Tkinter.Tk()
screenWidth, screenHeight = root.maxsize()
screenSize = "%dx%d" % (screenWidth, screenHeight)
root.geometry(screenSize)
Pmw.initialise(root)
class DataManagement:
def __init__(self,actualWidgetName,frame,widget,data):
(Continue reading)
from Tkinter import *
import Pmw
class PickleMixin:
def __init__(self):
self.widgets = {}
but..... the __call__ method gets called
when the instance of PrintOne is - called - not created. It's the
__init__ method that gets called when the instance is created.
Cheers
Martin.
--
Using M2, Opera's revolutionary e-mail client:
RSS Feed