From: Scott L. <sla...@th...> - 2002-09-07 18:32:52
|
On Fri, 6 Sep 2002, Mattia Barbon wrote: > Scott Lanning wrote: > > Frame for its parent and I end up doing things like this from > > the MenuBar subclass > > > > no strict 'refs'; > > EVT_MENU($parent, '...', \&{ref($parent) . 'OnMenuDialog'}); > $parent->can( 'OnMenuDialog' ) looks cleaner to me, BTW I didn't know `can' returns the CODE ref. Thanks! > the wxPliClassInfo object to locate the m_self memeber, get the > hashref stored here, and return it. If that fails, it uses > sv_setref_pv to create a new SCALAR reference and returns it. Thanks for the explanation. Hopefully I get more familiar with it and can help making some wrapper. > If you post a list of classes that you need to be HASH-ified, > I think I could do that for 0.12 . I was thinking just in terms of making the library better in general; I would feel selfish to request these things for myself. If you don't care either way, then: Wx::MenuBar, Wx::SingleChoiceDialog, Wx::TextEntryDialog; but these are only ones that I stumbled across so far as I learn the library. I'm still learning wxPerl and might not be using the correct approach. Even now I might change my mind to a different approach; for example, I just found XRC which looks very nice, and maybe then I am less likely to subclass these objects. In my mind, _all_ classes that can be subclassed should ideally be hashes, but I only mean it to be an idea to consider. |