$prompt=$main->DialogBox(-title=>"Say it", -buttons=>["OK","Cancel"]);
my $getNewAfrm=$prompt->add(Text, -height=>'5', -width=>'30');
$prompt->add($getNewAfrm);
In the first you create your dialog. In the second you add your text widget and save the widget handle into $getNewAfrm. Ok so far.
Then, for no reason I can discern, you suddenly decide to try and add the widget handle to the dialog?
Suffice to say, if you comment out the third line of the sub, your application runs.
Now! Please learn to format your posts! At least check them before submitting. Your are forced to preview them! I doubt that anyone will bother to even look at your questions unless you make some effort to do this in future. |