in reply to Simple Calculator using Tk
One minor thing (which bites me often too) - the generation of a bug via cut & paste. You duplicated the line to create all your menu commands, and consequently your Exit command is passed as a 'Q' button press. Unfortunately there is no 'Q' button, so the 'Q' is passed on to calc(), where it acts to clear the display and buffer.
Update: To clarify, there is nothing fundamentally wrong with cut & paste code generation, as long as you are aware of and checking carefully for this type of error. However, if you find yourself needing many copies of the same line with very minor changes, sometimes it indicates that you should consider a different structure.
--
I'd like to be able to assign to an luser
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Simple Calculator using Tk
by eoin (Monk) on Feb 20, 2004 at 13:08 UTC |