Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Tue Nov 27, 2007 11:09 pm   

[2.13] Can't paste xml text for a button in the XML tab of PE
 
That is. It started in 2.11, but seems no one else has this bug.

In one of my threads for 2.10 I had suggest in the untitled session paste some xml on XML Tab for newly-created button. The sample was like this
Code:

<button name="btnFighting" type="Toggle" variable="valFighting" transparent="false" priority="10" id="1">
  <caption>btnCaption</caption>
  <value>//Comment
#IF (0 < 2) {#NOOP}</value>
  <tooltip>Character state (Fighting, not fighting)</tooltip>
  <state caption="btnFighting" color="red">//Comment
#IF (1 > 0) {#NOOP}</state>
</button>


It work perfect. But since 2.11 if I gonna paste almost anything in the XML tab, immediately upon leaving this tab xml or clicking Save CMUD resets XML field to its default value. For button in the untitled session it is <button priority="10" id="1"/>
Sometimes the same is true and for other settings type, but that cases are rare.

Can anyone suggest me what I must check else in this situation? I have run out of ideas.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Nov 27, 2007 11:14 pm   
 
I'm seeing this as well, from copying what you have there, pasting onto the XML tab of a new button, and clicking Save Changes.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Tue Nov 27, 2007 11:16 pm   
 
Ah, so it is a bug. That's much better! Smile
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 28, 2007 12:18 am   
 
No, it's not a bug. Your XML is wrong. In your VALUE tag you have this:
Code:
<value>//Comment
#IF (0 < 2) {#NOOP}</value>

Notice the < character...that character is invalid within an XML tag. You need to use & lt; (without the space), or put it within a CDATA tag.

Put the

#IF (0 < 2) {#NOOP}

code into the Script of a new button and then click the XML tag and you will see how it is properly converted. If you are going to use XML, you need to understand how to create valid XML text. When you paste your original text, notice the color highlighting for the XML in the editor. Notice that the /value closing tag is not colored blue like it should be for a valid tag.
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Tue Dec 04, 2007 9:05 am   
 
Doh! I havn't noticed that browser in my original thread substituted "& lt/& gt" with </> signs (originally they were "& lt/& gt" exactly!). Embarassed
But this leads me to question: is it the right way to clear ALL text in the XML tab if there *at least one* invalid xml character? This CMUD behaviour was changed somewhere around 2.11; were there any reasons to do that (if they are not secret Wink)?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Dec 04, 2007 5:22 pm   
 
CMUD doesn't store the XML directly. When you paste the XML and then save it, the XML is imported into the actual settings, and then the XML is recreated (exported) from the setting to display it. So when there is an XML error, CMUD has no way to generate the original text that you entered.

This has never changed, so I'm not sure how it would have worked in 2.11.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net