Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Jeff Shannon
Jacob S. wrote: Great! I took the improvements you gave me an added support for keys (So you can type in 1.25+2= instead of having to type the buttons.) As always, I encourage improvements to my code. Maybe that will be my disclaimer... I have always liked and wanted to adopt Liam's. Here's a few t

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Jacob S.
> > Great! I took the improvements you gave me an added support for keys (So you > > can type in 1.25+2= instead of having to type the buttons.) As always, I > > encourage improvements to my code. Maybe that will be my disclaimer... I > > have always liked and wanted to adopt Liam's. > > Here's a f

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Kent Johnson
Jacob S. wrote: For some reason I don't understand, for me add works from the keyboard and multiply doesn't!? The same thing happened to me. That's when I realized that we were using 'x' for the text on the multiply button and binding 'x' to multiply(), whereas both of us were trying to use '*' to

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Jacob S.
I guess my next big thing is to try to make a copy of a TI - 36X Solar -- That will be an undertaking for me. First I'll have to research the buttons to see what all they do. Then, I'll have to do all of the text and command changes on the buttons as part of the command of the second and third fun

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Jacob S.
> Ah, right you are. I should know better than to post untested code, it's usually buggy! > > I think you need to do the same thing for add(), subtract(), multiply() and divide(). For some > reason I don't understand, for me add works from the keyboard and multiply doesn't!? The same thing happene

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Kent Johnson
Jacob S. wrote: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) TypeError: () takes exactly 1 argument (0 given) I got this error when trying to send command = lambda x: self.adddigit('1'

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Jacob S.
Ugggh, the code I sent looks ugly when it came back. Why does Outlook Express wait until you receive mail to wrap the text? Isn't there an on/off switch for the stupid wrapping that sucks and starts working at the wrong time? ___ Tutor maillist - Tutor

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Jacob S.
Exception in Tkinter callback Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) TypeError: () takes exactly 1 argument (0 given) I got this error when trying to send command = lambda x: self.adddigit('1') to makeButton

Re: [Tutor] My best GUI app so far.

2005-01-11 Thread Kent Johnson
Jacob S. wrote: Great! I took the improvements you gave me an added support for keys (So you can type in 1.25+2= instead of having to type the buttons.) As always, I encourage improvements to my code. Maybe that will be my disclaimer... I have always liked and wanted to adopt Liam's. Oh, by the way

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread Jacob S.
Great! I took the improvements you gave me an added support for keys (So you can type in 1.25+2= instead of having to type the buttons.) As always, I encourage improvements to my code. Maybe that will be my disclaimer... I have always liked and wanted to adopt Liam's. Oh, by the way, I'm not tryin

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread Jacob S.
> - How about some white space! Yikes, you trying to make me go blind? Ahh. That's definitely a odd preference of mine. > - You don't actually need to save all the buttons to attributes. Great idea! > - Much of the button creation is common - I made a button creating function and call that. I

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread Kent Johnson
My suggestions: - How about some white space! Yikes, you trying to make me go blind? - You don't actually need to save all the buttons to attributes. - Much of the button creation is common - I made a button creating function and call that. Copy / paste is not your friend, it is a danger! Refact

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread jfouhy
Quoting "Jacob S." <[EMAIL PROTECTED]>: > Is there some way that I could loop over those button definitions? You could try something like this: defArgs = { 'width':4, 'height':3 } # Format: ( label, callback, grid_row, grid_column ) buttons = [ ('0', s

[Tutor] My best GUI app so far.

2005-01-10 Thread Jacob S.
Here's the code. If you have time, look it over and give me suggestions for improvement! (big toothy grin) ### Start of Calculator.py ### from __future__ import division from Tkinter import * class Application(Frame): def ctb(self): if self.shouldblank: self.distext.set(''