in reply to Wx::RichTextXMLHandler->LoadFile fails to load file into buffer.

I think it's expecting a Wx::RichTextBuffer object, not an undefined scalar.

Update: Try:

my $xml_handler = Wx::RichTextXMLHandler->new(); $xml_handler->LoadFile( $self->{rich_text_ctrl_1}->GetBuffer(), "output.xml", );
  • Comment on Re: Wx::RichTextXMLHandler->LoadFile fails to load file into buffer.
  • Download Code

Replies are listed 'Best First'.
Re^2: Wx::RichTextXMLHandler->LoadFile fails to load file into buffer.
by Steve_BZ (Chaplain) on Jan 14, 2010 at 10:21 UTC

    Hi ikegami

    This is what I thought it should be. Did it work for you? I could only get the AddHandler staff working that Anon sent in.

    Regards

    Steve

      It didn't crash, but that's the extent of my testing since the code you gave isn't runnable

        Hi ikegami

        Well, it was crashing code anyway, but you're right, I missed out the 'main' loop! Very sorry about that. I've now updated my main post and commented where I've put the 'main' loop in.

        Regards

        Steve