|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Nov 05, 2007 4:57 pm
[2.10] Modules Exported via XML Reimport as Windows |
To reproduce the main bug you only need to to step 12.
1. Launch CMUD
2. Hit Esc to go to Default Session.
3. Hit Ctrl-G to Launch Package editor.
4. Create new package and give it any name you want.
5. Create two modules in new package. Put an alias in one and some variables in the other.
6. Select both modules, right click and choose Export Selection to XML save it as Test1.xml
7. Go to the File Menu and choose Export XML (All) and save it as Test2.xml
8. Close the package editor then close the session. You can exit CMUD at this point but it doesn't make a difference.
9. Hit Esc to go to default session.
10. Hit Ctrl-G to launch the Package Editor.
11. Go to the File Menu and choose Import XML.
12. Select Test1.xml or Test2.xml from previous step.
At this point the modules will be imported but they will be display as windows.
13. Select one of the recently imported Module/Windows. Make sure it's not the active one for the session.
14. Click the convert to module button. Note the display icon is not change.
15. Go to the View Menu and choose Refresh. Now the icon is properly displayed.
16. Close the package editor, select the untitled window and hit Ctrl-G to reopen the package editor.
17. Convert the other window imported import to a module. Note the display icon is not change.
18. Go to the View Menu and choose Refresh. Now the icon is properly displayed.
19. Close the package editor again.
20. Click on all three windows.
At this point even though you only have one window in your package you have 3 in your session.
21. Choose one of the imported window/modules.
22. Type any #SHOW or #ECHO command at the command line. You'll see that this works.
23. Create an alias at the command line. E.g.
Code: |
#alias test {Hello} |
24. Hit Ctrl-G to go back the Package Editor.
25. Expand the module/window you had selected and you will see your newly created alias there.
At this point I decided to see if and where I could get CMUD to crash.
26. Save this package, give it any name you want.
27. Close the package editor and then the session. (Optionally exit CMUD and relaunch.)
28. Hit Esc to go to the default session.
29. Hit Ctrl-G to open up the package editor.
30. Open the package you saved in step 26.
31. You will see you proper modules and window.
An odd thing I noticed here is that I had the tab for package I just imported and a tab with no name in the Package Editor. If I'd closed CMUD in Step 27 I'd see two tabs both named untitled. Another was even though I had two different packages with windows named untitled, there was only one window in the session. Zugg will give the official answer here, but it would not be unreasonable for a user to expect two windows here.
There seem to be a few bugs here, or maybe the import to XML causes CMUD to be confused. On the upside there was no actual crash.
P.S. I think this one is worthy of Vijilante himself. |
|
_________________ Asati di tempari! |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Nov 09, 2007 1:10 am |
Anyone get a chance to confirm this?
|
|
_________________ Asati di tempari! |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Fri Nov 09, 2007 1:15 am |
Confirmed. You don't need to do step 7. If you just export it once then import it then they import as windows too.
Btw, the XML created was the following
Code: |
<?xml version="1.0" encoding="UTF-8" ?>
<cmud><module name="mod1">
<uid>{F467E5CC-2FE0-4A4B-894A-689B74E12791}</uid>
<alias name="blah">
<value>#say 123123</value>
</alias>
</module>
<module name="mod2">
<uid>{E9426FD4-F3C4-40A9-AA92-C1C8B91D9A90}</uid>
<var name="a">1</var>
<var name="b">2</var>
<var name="c">3</var>
</module>
</cmud> |
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Fri Nov 09, 2007 1:17 am |
Seems you can cut down the XML even further and it still creates a window
Code: |
<?xml version="1.0" encoding="UTF-8" ?>
<cmud>
<module name="test">
<uid>{F467E5CC-2FE0-4A4B-894A-689B74E12791}</uid>
</module>
</cmud> |
A completely empty module... |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Nov 09, 2007 5:39 am |
I have seen this simply by creating a module, highlighting it, right-click and select Copy. At that point it puts the same xml in the clipboard as the export. Then simply paste into another package.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Nov 09, 2007 6:32 am |
Yep, it's on the bug list.
|
|
|
|
|
|