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

Hi Anon,

I've just been over all your code again, because it seems like the nearest to a solution so far.

I got to the same point as you, crashing on preview. It's the line my $state = $frame->Show(1);.

I picked out your other bits and pieces and used them selectively, but I got no further than before where I could get the preview to show, but I have to capture the preview EVT_COSE command on exit and handle it manually.

However, two more clues are:

  1. The Printing demonstration command in the demo also uses Wx::PreviewFrame (actually PlPreviewFrame but that doesn't work with this code either) and has no code at all to handle the exit - but it exits perfectly and returns control to the calling window.
  2. The $i_RTC_panel->{printout}->GetDC; which I put in for a test, doesn't fail with a "no such method" style error, but it doesn't return anything (which it should). Just a null instead of the pointer to the MemoryDC associated with the preview.

So I wonder if the two are linked.

Regards

Steve.

Replies are listed 'Best First'.
Re^3: wxPreviewFrame error on closing
by Anonymous Monk on Sep 11, 2010 at 02:18 UTC
    So I wonder if the two are linked.

    Maybe, but why wonder when you can find out? Fire up strace or debugger and find out exactly where the error occurs in c/xs code... then you can either fix it, or file the appropriate bug report