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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Jun 27, 2008 9:07 pm   

Loading and Saving Scripts
 
I don't know if this is a bug...
I am able to load a script into CMUD that contains class and subclass definitions along with the aliases, variables, etc. However, when I try to save a class (and its contents) to a file, the request is ignored.
_________________
Sic itur ad astra.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Jun 27, 2008 9:31 pm   
 
Bah, you know better then to post with so little details. How are you trying to save the class script?
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Jun 28, 2008 8:34 am   
 
I click on the class so that it is highlighted and then select Save Script to File from the Editor menu.
_________________
Sic itur ad astra.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Mon Jun 30, 2008 8:08 pm   
 
OK, if this is not bug, then please update documentation.
_________________
Sic itur ad astra.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 01, 2008 12:26 pm   
 
It would appear to be a bug. I'm pretty sure it used to work but I haven't tried it in a couple versions.
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jul 01, 2008 5:49 pm   
 
That's not really a bug. The stuff in the Editor menu only applies to the Script Editor that is visible when you are editing something like an alias or trigger. The Script Editor is the box that has the line numbers in the left column and has the color syntax highlighting.

A "Class" doesn't have any script editor. Maybe you are talking about the XML tab of the class window?
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Jul 01, 2008 7:34 pm   
 
Well, I am talking about the Package Editor. I can, for instance, create a blank alias setting, then from the menu select Editor|Load script from file and load and entire script into the Package Editor. True, it will copy the text into the alias, but it will also generate all the settings contained in the script, classes, aliases, triggers, functions, variables, etc. My point is that the reverse is not true. If I select a class folder and then select Editor|Write script to file and all the settings contained in that class should be written out. zMUD had an analog feature. I remember distinctly being able to write an entire class to file in 7.21
_________________
Sic itur ad astra.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Tue Jul 01, 2008 7:50 pm   
 
You can somewhat do this by right clicking on the class folder and choosing 'export selection to XML' and then import it wherever you want.
The main problem here is that when importing, it creates an entirely new module/window of the same name to put the class folder/scripts into. From there you can drag and drop them where you want into your current window/module, then delete the one that the package editor decides to create for you.

Not a very user-friendly workaround, but functional.
_________________
Email: nikodareus@gmail.com

or

avonarys@gmail.com
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jul 01, 2008 8:19 pm   
 
Yes, the correct way to export a setting is to right-click and select Export to XML (or select Export to XML from the File menu). As I mentioned, the Editor menu only deals with the actual script editor screen.

For example, if you select an Alias and enter "#SHOW Hello World" in the Script field, then use the Editor/Save Script option, it will write the test "#SHOW Hello World" to the file. It won't save the name of the alias, or any of it's options. It's just saving the value of the "Script" field. The Export to XML is more like the feature you are thinking about from zMUD. It saves *all* of the alias to the file, including the alias name, options, script, etc. CMUD uses XML format instead of Text format because the simple text format from zMUD doesn't support many of the new options that are present in CMUD.

So, don't use the Load Script/Write Script options to save the entire class. If you want to save the entire class, use the Export to XML and Import from XML features.

Nicodareus: Importing won't actually create an entirely new module/window. That was a bug in a previous version. If there is still a problem like that with importing classes creating a new window, post more details in a new forum topic.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Tue Jul 01, 2008 8:39 pm   
 
Well, it's not an issue I've had to deal with yet, but it does exist. So I suppose for other people's sakes I'll make the topic.. The only reason I noticed it was because I was testing out the import/export to xml options to answer this guys questions, not for myself :P
_________________
Email: nikodareus@gmail.com

or

avonarys@gmail.com
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Jul 01, 2008 8:57 pm   
 
I thought I saw this, but I'm not 100% sure because the package I was working with seems to have gotten corrupted. I'll be doing more testing this evening to figure out exactly what the issue is.
_________________
Asati di tempari!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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