Though this doesn't affest the compilation or running of your code, it does affect people's willingness to help--can you see the difference between say this:
$left->Label(
and [big hint here] these:
-text=>"",-width=>12,-background=>'white' ?
Please make appropriate use of whitespace in your code.
I normally code something like this:
$left->Label(-text => '', -width => 12, -background => 'white');
However, this script is a mere 40 something lines of code and was originally intended for no one but me as a Tk learning tool, so I admit it was quite sloppy. When I copied it for the posting to the list, I made no formatting changes. For the readability of the users on the list, your suggestion is duly noted.
Is this where you are trying to use that value from the Entry widget? If so, don't do it. Hand an SQL engine only queries that have been completed. WHERE cuid = $user_string ))
Hmmm, have you had any practice in passing parameters, and making and using
parameterized subroutines? I know most people start out with ambitious projects, but to make your project succeed, you may have to step back a few paces and acquaint yourself with some language basics. Both Tk and DBI are high-end modules, that presume an understanding of programming essentials. I'd recommend a series of smaller projects, testing basic concepts such as argument passing and use of references, before attempting to develop application software.
Joseph
Passing parameters? A moderate, but not great amount of experience and I will admit that I probably use globals instead of actually passing parameters more often than I should. My problem here was understanding the structure of the Tk Widgets. I had even tried using the get() function, but without a solid understanding, I had tried it in the wrong place in the code - I used it before the procedure call and tried to pass the result, which of course, didn't work, either. Once I moved the get() into the subroutine, I finally had success. Yesterday was my first day working with Tk - it's coming to me slowly, but steadily.
As far as DBI, I've been using it quite extensively for over two years with scores of scripts in production and I must disagree with your statement above about preparing the SQL statement with placeholders. It is not really an issue with this trivial script, however, when reusing a SQL script, without placeholders, the script must be prepared each time you change any literal values, such as the contents of $user_string in your example above. With placeholders, you prepare the statement exactly one time and execute it whenever you need by passing the values to execute().
Anyway, thanks for the help with the Tk problem.
-Mike
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>