Title: Signature.html
Ah, another function without a link to a use. body, as in :
(note that apply really is part of the class. It looked outside it earlier.)

class SetDecoderDialog(tkSimpleDialog.Dialog):

    def __init__(self, parent, gui):
        self.gui = gui
        tkSimpleDialog.Dialog.__init__(self, parent)
       
    def body(self,master):
        self.title("Set Video Decoder Register")

        Label(master, text='Register:').grid(row=0, sticky=W)
        Label(master, text='New Value:').grid(row=1, sticky=W)

        self.reg = Entry(master, width=10)
        self.val = Entry(master, width=10)

        self.reg.grid(row=0, column=1, sticky=W)
        self.val.grid(row=1, column=1, sticky=W)

        return self.reg

    def apply(self):
        reg = eval(self.reg.get())
        val = eval(self.val.get())
        self.gui.SetDecoder( reg, val )

That's the end of the class. Is there something going on here between body-apply and tkSimpleDialog? Making them available to it?

Wayne Watson wrote:
Any idea what it would be used for?

Kent Johnson wrote:
On Mon, Feb 9, 2009 at 2:03 PM, Wayne Watson
<[email protected]> wrote:
  
I see the following code that follows some of the class definitions in some
python code I'm modifying. I don't see the function anywhere in the program.
Possibly it's called from another module, but I doubt it. There's only one
other non-python library module for it. It has to do with Quick Time.

    def apply(self):
        self.sdict["ok"] = True
    

OK...was that a question?

Kent

  

--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
  
The Richard Feynman Problem-Solving Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>

_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor

--
Signature.html
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
The Richard Feynman Problem-Solving Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to