In your sub write_affirm your have the following three lines of code.

$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.


In reply to Re: Text in DialogBox weirdness by BrowserUk
in thread Text in DialogBox weirdness by NodeReaper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.