Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ tabs not loaded from XML-File

tabs not loaded from XML-File

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Cipri   Netherlands  (18 posts)  Bio
Date Wed 09 Apr 2003 07:56 AM (UTC)

Amended on Wed 09 Apr 2003 08:10 AM (UTC) by Cipri

Message
I noticed that using a tab in the `Send to Status` would center the text, and two tabs would right-align the text. So I defined the following trigger to send database dumps centered to the status bar:


<triggers>
  <trigger
   enabled="y"
   match=".*(\*\*\*\* DATABASE SAVE ST.* \*\*\*\*).*"
   omit_from_output="y"
   regexp="y"
   send_to="3"
   sequence="100"
  >
  <send>	%1</send>
  </trigger>
</triggers>


I saved the world, opened the file with notepad, and the tab was saved along with it. Yet when I open the world, the tab has been converted to a space, and the text gets no longer centered. This used to work with my previous version (3.23 I think.)


[edit]
It seems that MushClient's correctly interpreting the \t as a tab when it loads the XML though, so I switched to those to follow the XML Specs. Though the tab stripping is still unspecified and different from how it used to be;)
[/edit]
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 09 Apr 2003 09:33 AM (UTC)
Message
I'm not sure I ever changed the way XML is saved/loaded. Are you sure that the version that worked was not the pre-XML one (ie. 3.20 or earlier)?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 10 Apr 2003 04:06 AM (UTC)
Message
I'm not sure I want to change anything here. I am defining tabs in the XML file as whitespace, perhaps wrongly. :)

However the \t you mention is not picked up in the XML parse, if you open the trigger you will see it is still there.

However when the trigger text is sent the "backslash" sequences are then acted upon at trigger evaluation time.

It is probably best to use that method anyway, as the difference between a space and a tab can be pretty hard to spot in the GUI interface (and XML file), whereas \t is pretty self-documenting.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Cipri   Netherlands  (18 posts)  Bio
Date Reply #3 on Sat 12 Apr 2003 11:25 AM (UTC)
Message
Yes, the \t aren't parsed, and are actually shown in the Trigger edit window, which indeed is perfect :)
Indeed, with the \t's it's working perfectly, so no change is really needed :)
The only thing that could perhaps be done is change tabs to \t when you save the trigger and give a little popup or something... *shrugs* :)
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,248 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.