Page 1 of 1
Textview class: how can write a „&“ ?
Posted: Wed Mar 25, 2020 8:39 pm
by root
Hi guys!
I have a problem when i try to write the & symbol in the textview class!
Error: Error parsing XML: not well-formed (invalid token)
Re: Textview class: how can write a „&“ ?
Posted: Thu Mar 26, 2020 2:46 am
by SamuraiCrow
There are five special characters in xml that require special codes to render. The code for ampersand is "& amp ;" with the spaces and quotes removed.
Source:
http://xml.silmaril.ie/specials.html
Re: Textview class: how can write a „&“ ?
Posted: Thu Mar 26, 2020 5:51 pm
by root
ok - thanks!
But when i use & in the Hollywoodapp is see always two & signs (&&)??
Re: Textview class: how can write a „&“ ?
Posted: Sat Mar 28, 2020 12:31 pm
by airsoftsoftwair
What do you mean by "in the Hollywood app"?
Re: Textview class: how can write a „&“ ?
Posted: Sat Mar 28, 2020 1:43 pm
by Bugala
are you looking for this:
Code: Select all
text = "to use \"quote\""
TextOut(100, 100, text)
WaitRightMouse()
This "\" can be used for others too.
Re: Textview class: how can write a „&“ ?
Posted: Sat Mar 28, 2020 2:13 pm
by root
OK
Here is a little code to demonstrate the "double sign bug???"
Code: Select all
@REQUIRE "RapaGUI"
xml = [[
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="Textview example">
<vgroup>
<textview>
Hello & World
</textview>
</vgroup>
</window>
</application>
]]
moai.CreateApp(xml)
Repeat
WaitEvent
Forever
And here the result is a double & sign

Re: Textview class: how can write a „&“ ?
Posted: Sun Mar 29, 2020 6:02 pm
by jPV
On MorphOS I only get one & character with that example... so it must be a platform dependant bug...
Re: Textview class: how can write a „&“ ?
Posted: Thu Apr 02, 2020 5:21 pm
by airsoftsoftwair
Actually, with my WIP version of RapaGUI 2.0 the code posted by root works fine on Windows too. So I think this has been fixed already...