FAQ

At 1:07 AM +0100 3/21/06, Christian Renz wrote:
www.sidhe.org/~dan/Wx-WebKit-0.01.tar.gz. It builds and tests, but
that's all I
I didn't get very far -- just creating a control gives me a bus
error. Here's a very simple test. Replace Wx::WebKitCtrl with
Wx::Button and the bus error is gone -- it's really Wx::WebKit's fault.
Huh. I'll try and track down what's going on. This is my test
program, which does seem to work for me (yeah, it's hacked-up glade
output):

#!/usr/bin/perl -w --
use Wx 0.15 qw[:allclasses];
use strict;

package MyFrame;

use Wx qw[:everything];
use base qw(Wx::Frame);
use strict;

sub new {
my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_;
$parent = undef unless defined $parent;
$id = -1 unless defined $id;
$title = "" unless defined $title;
$pos = wxDefaultPosition unless defined $pos;
$size = wxDefaultSize unless defined $size;
$name = "" unless defined $name;

$style = wxDEFAULT_FRAME_STYLE
unless defined $style;

my $frame = Wx::Frame->new( $parent, $id, $title, $pos,
$size, $style, $name );
use Wx::WebKit;
my $web = Wx::WebKitCtrl->new($frame, -1,
"http://www.google.com/", Wx::Point->new(1,1),
Wx::Size->new(500,500));
$frame->SetAutoLayout(1);
$frame->Layout();
return ($frame, $web);

}

1;

package main;

unless(caller){
local *Wx::App::OnInit = sub{1};
my $app = Wx::App->new();
Wx::InitAllImageHandlers();

my ($frame_1, $web) = MyFrame->new();

$app->SetTopWindow($frame_1);
$frame_1->Show(1);
$app->MainLoop();
}


--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
groupwxperl-users @
categoriesperl
postedMar 19, '06 at 8:50p
activeMar 22, '06 at 9:17a
posts6
users2
websitewxperl.sourceforge.net

2 users in discussion

Dan Sugalski: 3 posts Christian Renz: 3 posts

People

Translate

site design / logo © 2019 Grokbase