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
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Oct 27, 2007 3:36 pm   

[2.09] How to mess up the .tbz
 
I was noticing this in 2.08, but wasn't quite sure of what to make of it. Now I am figuring it is caused by having multiple windows with the same name or just a matter of bringing in multiple .muds to a single session. From this picture it looks like 2 tool bars are created for each of the secondary .muds.

The procedure I used to get this was offline opening of my imported session, this converted my main .mud and activated the old onload alarm in it. I disabled the onload alarm so it wouldn't cause trouble then closed CMud. Next launch and offline opening everything looked fine, so I proceeded to add another file. I used the package editor to open the channels.mud file. I again closed CMud, relaunched, and reopened. At this point the toolbar was likely messed up but I hadn't checked. Once again I used File|Open from the PE to bring in the room.mud then closed CMud.

All subsequent launches show messed up commandline positions for the room.mud and channels.mud windows. For a while one window had 2 'comline' and 'histbtn' items showing in the bar. The other window has a comline bar acrossed the middle of the screen with nothing else showing anywhere. I will make a backup of the tbz, just let me know if you want to examine it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Oct 27, 2007 3:51 pm   
 
It looks like this is more of a function of having multiple windows with the same name. When I deleted the orginal .tbz and let a new one be created it still caused a mess. If I remove the maximize from CMud, close it then relaunch and reopen the toolbars come out looking right, but I don't think the maxmized is the problem.


Edit: Holding down shift when opening the session caused them to appear correctly. Close, relaunch, and reopen returned them to a messed up state though.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 29, 2007 7:21 pm   
 
I'm having a hard time reproducing this one. Have you done a fresh install of 2.09? The reason I ask is that in 2.08 you might have gotten a corrupted preferences in one of your other packages (like your English Directions, or even your Default package).

One bug is that the windows without command lines are not supposed to show the toolbars in the customize menu, so I need to fix that in 2.10. So maybe that is related somehow.

Having multiple windows with the same name shouldn't be causing this problem. Even though the caption of the toolbar has the same name, the underlying toolbar component name adds an additional number to the end if there is a conflict. However, I can see a situation where this number might not match the same window if the order in which the windows is created gets changed somehow. So that might be part of the problem.

I'll see if I can make this a bit more robust so that the toolbars always correspond to the same window no matter how the load order might be changed.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 29, 2007 7:36 pm   
 
The bug was generated with a fresh install, the only thing I kept was a backup of the packages, layout, and tbz from 2.08. I did all my various import testing and found a few things, then finally deleted the directory with that testing mess and copied in the good backup from 2.08. So everything listed above was from a fresh install of 2.09 on.

Sadly I forgot about holding on to the bad file, but it would be easy enough for me to get it created again. My examination of it made it appear that some of the toolbars were being recorded as docked within the other toolbars.

I will try to develop a procedure for this that doesn't require an import and starts from a new session.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 29, 2007 7:56 pm   
 
Hmm, looks like CMUD already names the toolbars with a unique name based upon the unique module Guid. So I'm not seeing how it could confuse the toolbars unless the preferences are messed up for one or more modules.

I *did* discover why all of the toolbars are shown in the right-click menu as being visible even though they aren't. That should be fixed in 2.10.

Also, if you reproduce this, definitely send me the *.tbz file to look at. It's an ASCII file, so it's easy to send via email.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 29, 2007 8:13 pm   
 
It looks like the offending section of the toolbar is this.
Code:
[ParentForm.BarManager.Bar6]
Name=0_{A6AAD5AA-4E38-42D5-887C-4335D467A479}
Caption=Session Toolbar 3
DockedDockControl=MUDForm_2.MUDDock
DockedDockingStyle=2
DockedLeft=0
DockedTop=0
OneOnRow=1
Row=0
FloatLeft=0
FloatTop=0
FloatClientWidth=0
FloatClientHeight=0
DockControl=MUDForm_2.MUDDock
DockingStyle=2
Visible=1
ItemLinkCount=11

It seems to be pointing back to itself, this is the same thing I saw when I am examined the one from playing with importing.

Procedure
1. Launch CMud
2. Create a new session, give it a title
3. Open new session offline
4. Enter at the comandline
Code:
#WINDOW test2

5. Open Package Editor (CTRL-G)
6. Create a new window, give it the name test2 and click save changes
7. Close CMud with the big X
At this point you should be able to examine the .tbz file and something similar. It produces the lonely command line in the middle of the window effect.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 29, 2007 8:28 pm   
 
Reproduced! Thanks for that good procedure.

The entry in the tbz file that you mentioned is actually fine. The DockControl and "DockedDockControl" are supposed to have that value. One part that is wrong is that the caption still says "Session Toolbar 3" instead of "Session Toolbar: test2". So something isn't getting called properly when the window is created from within the Settings Editor vs using the #WINDOW command. And the main problem is that the "Visible=1" is set, which is what is making the command line visible.

Anyway, now that I have a procedure for this, I should be able to get it fixed.

I also noticed that when windows are deleted from the Settings Editor, the toolbar for that window is not getting removed, which is also causing clutter in the tbz file and in the right-click customize menu for the toolbars.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 29, 2007 8:30 pm   
 
Another test involving no windows of the same name also caused quite the mess within the file. So names can be ruled out, it looks like it more has to do with The use of the #WINDOW command to make windows, I will try a few other tests with it to see how badly I can mess it up.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 29, 2007 9:34 pm   
 
Bah, you posted while I was typing and then I concentrated on other tests and didn't even notice you replied.

One of the things I am seeing from my tests that also relate is that the .tbz gets saved differently depending on which tab is selected when closing. I was noticing that the file changed with just opening the session and closing CMud, without any other interaction with the session. It took me a while to figured out the selected tab makes a difference, and opening the session was changing the selected tab.

When playing with importing my files I also had one of the bars dock inside another bar. This resulted in there being 2 command lines at the bottom of the window. I can't seem to get that to replicate at all, but I can keep trying if you think it is worth it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 29, 2007 10:35 pm   
 
Also, don't knock yourself out too much playing with the toolbar system. The Developer Expression Toolbar components underwent a major update last year, and I haven't upgraded to them yet. This is mostly because I have made *so* many changes/fixes to the toolbar system that it will be a major effort to upgrade and then get everything working again. So I've been postponing this until the Delphi 2007 upgrade.

The existing toolbar version that I'm using has been patched a lot and is pretty finicky, so I'm not surprised if there are problems with it. But since upgrading it will potentially fix a lot of issues (and cause a lot of new issues), it's probably not worth a lot of real hard-core testing right now. As long as it works for most people, I'm going to leave it alone until the upgrade.
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