in reply to Re^3: wxPreviewFrame error on closing
in thread wxPreviewFrame error on closing

Hi Anon,

Well then, is it possible that one of the wrappings (maybe the one I did on RichTextPrintout) is not passing the event on to wxPrintout or whatever it's equivalent is? Because when I manually capture EVT_CLOSE and handle it, it's as near as I can get to the correct processing.

Alternatively, I could mimic the above c-processing, but I'd need a couple of hints:

  1. How to access windowDisabler since I don't know its Hash-name or address-pointer within the parent object.
  2. I'm not sure what the difference between delete and Destroy() is. I guess delete is remove an element from a Hash and then Destroy() is remove the object. In Perl, wouldn't the deletes be automatic if you just Destroy()ed the object?

So in that case all I have to do is to delete/Destroy() the windowDisabler as well.

Regards

Steve

Replies are listed 'Best First'.
Re^5: wxPreviewFrame error on closing
by Anonymous Monk on Sep 09, 2010 at 20:43 UTC
    ..is not passing the event on to wxPrintout or whatever it's equivalent is?

    Not likely

    How to access ...

    Probably $self->SUPER::OnCloseWindow($event) or add a

    void DeleteWindowDisabler (){ if (m_windowDisabler) delete m_windowDisabler; }
    then call $self->DeleteWindowDisabler(); but like I said, it should work already :)

    I'm not sure what the difference between

    delete is delete (or undef), Destroy is the destructor, it gets called after the object goes out of scope or is deleted