Hi,
I tried richtext sample that comes with wxWidgets, and was surprised that while it compiled without any problem it cannot properly load saved XML and HTML. The saved files were created by saving the content of the sample itself to disk. While loading them through the sample, the cursor turned to the waiting (loading) cursor, and Force-Quit shows that the application is not responding:
However, after 2-3 minutes the richtext sample loads XML (and HTML) source like so:
Can anyone confirm or help solve the issue?
Thanks.
----
Mac Book Pro 10.11 (El Capitan) wiih wxWidgets 3.1.1
wxRichTextCtrl sample error loading XML on OSX Topic is solved
Re: wxRichTextCtrl sample error loading XML on OSX
Hi,
I think loading those files in wxRTC is not supported.
There was a recent thread about and the consensus was that OP was trying to implement this.
You can search this forum and find that.
Thank you.
I think loading those files in wxRTC is not supported.
There was a recent thread about and the consensus was that OP was trying to implement this.
You can search this forum and find that.
Thank you.
Re: wxRichTextCtrl sample error loading XML on OSX
Loading XML should work, actually that's the only format that you can save and load without losing any information.
Saving as HTML is just an export, you can't load it back.
Saving as HTML is just an export, you can't load it back.
Use the source, Luke!
Re: wxRichTextCtrl sample error loading XML on OSX
Thank you both for anwering.
@ONEEYEMAN: I'm not sure which of these from search.php?keywords=wxrichtext+xml you were referring to.
@doublemax: Opening the saved XML file eventually worked, as shown by the second picture in the original question. But, shouldn't wxRichTextCtrl render the result as formatted text with pictures, just as in the original sample? What I mean is, shouldn't it look the same as the original sample?
@ONEEYEMAN: I'm not sure which of these from search.php?keywords=wxrichtext+xml you were referring to.
@doublemax: Opening the saved XML file eventually worked, as shown by the second picture in the original question. But, shouldn't wxRichTextCtrl render the result as formatted text with pictures, just as in the original sample? What I mean is, shouldn't it look the same as the original sample?
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: wxRichTextCtrl sample error loading XML on OSX
Hello, If you pass the right type as second parameter to wxRichTextCtrl::LoadFile (ie. wxRICHTEXT_TYPE_XML), it should parse the XML file. One of my commercial apps built against wx 3.0 is using this under Windows and Mac without issue.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: wxRichTextCtrl sample error loading XML on OSX
Thank you eranon, that answers my question. Silly of me for not realising it