Well, it looks as though I should have used SetValue instead of SetBuffer,
but the crash is on the line before.

        $html_handler->LoadFile($buffer, $fh );

But maybe the error is in the XML instead of the wxPerl syntax?

The XML is created by just saving the buffer in the sample application, here
it is (sorry for the length):

Regards

Steve

<?xml version="1.0" encoding="UTF-8"?>
<richtext version="1.0.0.0" xmlns="http://www.wxwidgets.org";>
  <paragraphlayout textcolor="#000000" fontsize="8" fontstyle="90"
fontweight="90" fontunderlined="0" fontface="MS Shell Dlg 2" alignment="1"
parspacingafter="10" parspacingbefore="0" linespacing="10">
    <paragraph fontweight="92" alignment="2" parspacingafter="20"
parspacingbefore="0">
      <text fontsize="14" fontweight="92">Welcome to wxRichTextCtrl, a
wxWidgets control for editing and presenting styled text and images</text>
      <text fontweight="92"></text>
    </paragraph>
    <paragraph alignment="2" parspacingafter="20" parspacingbefore="0">
      <text fontstyle="93" fontweight="92">by Julian Smart</text>
      <text></text>
    </paragraph>
    <paragraph parspacingafter="20" parspacingbefore="0">
      <text></text>
    </paragraph>
    <paragraph parspacingafter="20" parspacingbefore="0">
      <text></text>
    </paragraph>
    <paragraph leftindent="60" leftsubindent="0" parspacingafter="20"
parspacingbefore="0">
      <text>"What can you do with this thing?  Well, you can change text
"</text>
      <text textcolor="#FF0000">colour, like this red bit.</text>
      <text textcolor="#0000FF">" And this blue bit."</text>
      <text>" Naturally you can make things "</text>
      <text fontweight="92">"bold "</text>
      <text fontstyle="93">"or italic "</text>
      <text fontunderlined="1">or underlined.</text>
      <text fontsize="14">" Different font sizes on the same line is
allowed, too."</text>
      <text>" Next we'll show an indented paragraph."</text>
      <text></text>
    </paragraph>
    <paragraph parspacingafter="20" parspacingbefore="0">
      <text>Indented paragraph.</text>
      <text></text>
    </paragraph>
    <paragraph leftindent="100" leftsubindent="-40" parspacingafter="20"
parspacingbefore="0">
      <text>Next, we'll show a first-line indent, achieved using
BeginLeftIndent(100, -40).</text>
      <text></text>
    </paragraph>
    <paragraph parspacingafter="20" parspacingbefore="0">
      <text>It was in January, the most down-trodden month of an Edinburgh
winter.</text>
      <text></text>
    </paragraph>
    <paragraph leftindent="100" leftsubindent="60" parspacingafter="20"
parspacingbefore="0" bulletstyle="257" bulletnumber="1">
      <text>Numbered bullets are possible, again using subindents:</text>
      <text></text>
    </paragraph>
    <paragraph leftindent="100" leftsubindent="60" parspacingafter="20"
parspacingbefore="0" bulletstyle="257" bulletnumber="2">
      <text>This is my first item. Note that wxRichTextCtrl doesn't
automatically do numbering, but this will be added later.</text>
      <text></text>
    </paragraph>
    <paragraph parspacingafter="20" parspacingbefore="0">
      <text>This is my second item.</text>
      <text></text>
    </paragraph>
    <paragraph rightindent="200" parspacingafter="20" parspacingbefore="0">
      <text>The following paragraph is right-indented:</text>
      <text></text>
    </paragraph>
    <paragraph parspacingafter="20" parspacingbefore="0">
      <text>It was in January, the most down-trodden month of an Edinburgh
winter. An attractive woman came into the cafe, which is nothing
remarkable.</text>
      <text></text>
    </paragraph>
    <paragraph tabs="400,600,800,1000">
      <text>This line contains tabs:    First tab       Second tab
Third tab</text>
      <text></text>
    </paragraph>
    <paragraph leftindent="100" leftsubindent="60" bulletstyle="32"
bulletsymbol="42" bulletfont="" tabs="400,600,800,1000">
      <text>Other notable features of wxRichTextCtrl include:</text>
      <text></text>
    </paragraph>
    <paragraph>
      <text>Compatibility with wxTextCtrl APIRich text</text>
    </paragraph>
  </paragraphlayout>
</richtext>

Reply via email to