in reply to Re: How can I call a class method of the object's parent class?
in thread How can I call a class method of the object's parent class?
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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How can I call a class method of the object's parent class?
by dissident (Beadle) on Jan 05, 2018 at 09:17 UTC |