开发者

Perl tk main window error

I have a Perl Tk application.

If I move the main window so that it's not right up to the uppermost part of the screen, then the next time the following code is executed, the script fails:

$canvas_fimage_real=$canvas_fimage->Subwidget('canvas');
$canvas_fimage_real=$canvas_fimage unless $canvas_fimage_real;
my $canvas_id=$canvas_fimage_real->id;

my $canvas_fimage_photo=$main_window::main_window->Photo(-format=>'Window', -data=>oct $canvas_id );

And it fails with the following error message:

X Error 开发者_StackOverflowof failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  2796
  Current serial number in output stream:  2796

The script crashes at the Photo command.

How can I fix this?


Is this a window that is wholly on the screen? The snapshotting facility only works with what is visible on-screen (a low-level X11 condition; not negotiable). As such, you should file a bug report as the snapshot code shouldn't ask for things that it can't get.

Of course, if the window is fully on screen and you're getting that error message anyway, that's a serious problem. File a bug report in that case too!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜