develooper Front page | perl.wxperl.users | Postings from April 2011

Can't locate Wx::MemoryFSHandler

Thread Next
From:
Laslo Forro
Date:
April 14, 2011 07:13
Subject:
Can't locate Wx::MemoryFSHandler
Message ID:
BANLkTinaZDeySnbYSLjf5u3ZyOg6Cu0d5w@mail.gmail.com
Hi there,

I am trying to use a custom xml to generate parts of the GUI. The code
skeleton is:

package MyFrame;
use WX qw/:everything/;
use Wx::XRC;
use base qw(Wx::Frame);

sub new {
   my $self=$_[0]->SUPER::new();
   # Load and process xml into $xml
   .....
   # make a memory FH ( XRCCustom )
      Wx::FileSystem::AddHandler ( Wx::MemoryFSHandler->new );   <-----
      Wx::MemoryFSHandler->AddTextFile('project_open',$xml);
  # load XmlResource
      my $xrc= Wx::XmlResource->new();
      $xrc->InitAllHandlers();
      $xrc->Load('memory:project_open');

  # do the rest blahblah
      return $self;
}

I receive a 'Can't locate Wx::MemoryFSHandler error' on the <---- line and
unfortunately I have not idea why.
Thanx for any hint in advance!

Bests,
Laslo Forro


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About