[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] MacPerl'Ask bug



Hi,

I'm having a problem with the &MacPerl'Ask subroutine returning garbage
data. For example, in the following script, I use a series of these
subroutines to collect input from the user. If the user actually enters
something for each input, then it works as expected (the values returned
are what the user entered). But if the user leaves one or more inputs blank
and then clicks "OK", then what is returned is not a null value but instead
some junk data that varies  depending on what was entered for previous
inputs. Please try the script out for yourself and you'll see what I mean.
Try entering some values while leaving others blank. If anyone can suggest
how I can get around this bug, I'd really appreciate it.

-------------------------------
#!perl

$border = &MacPerl'Ask("Border of table");
$width = &MacPerl'Ask("Width of table");
$height = &MacPerl'Ask("Height of table");
$cellspacing = &MacPerl'Ask("Spacing between cells");
$cellpadding = &MacPerl'Ask("Padding within cells");
$caption = &MacPerl'Ask("Caption of table");

print "\$border = \'$border\';\n";
print "\$width = \'$width\';\n";
print "\$height = \'$height\';\n";
print "\$cellspacing = \'$cellspacing\';\n";
print "\$cellpadding = \'$cellpadding\';\n";
print "\$caption = \'$caption\';\n\n";

exit;
-------------------------------

Thanks a bunch!

-Sam


Sam Choukri   \  <http://www.missouri.edu/~c588349/>  /   sam@pobox.com
---------------*                                     *-----------------
John Lennon - sights, sounds, info  | TableMaker - make HTML 3.0 tables
 ColorMaker - color your web pages  |  FrameShop - make Netscape frames