Thank you very much for looking into this!

Yes, the thing that this class is actually two packages confused me very much.

Both have different class methods. I followed just the documentation which does not indicate anything about this mixed inheritance, and only tells about using Curses::UI::Popupmenu.

What I am still not understanding how to solve correctly is:

Using the class Curses::UI::PopupmenuListbox does not work, because this class/object is generated/used by Curses::UI::Popupmenu itself, when the dropdown box is to actually be opened/painted.

The object that the application gets with the Popupmenu->new() method is of class Popupmenu, with completely different inheritances than those of PopupmenuListbox class. Thus, if I understand correctly, I have no way to call the PopupmenuListbox methods using the object of class Popupmenu I got.

I have the impression that it is not intended that the application itself deals with the PopupmenuListbox class, which in my impression the author intended to encapsulate from the application.

Thus, thinking about it, I now ask myself whether the correct approach could maybe to implement a Popupmenu class method set_selection(), which can then encapsulate the PopupmenuListbox handling from the application?


In reply to Re^2: How can I call a class method of the object's parent class? by dissident
in thread How can I call a class method of the object's parent class? by dissident

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.