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
Zugg
MASTER


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

PostPosted: Thu Jun 26, 2008 9:27 pm   

[2.29] Bugs/issues with MXP FRAMEs
 
I am moving the discussion of MXP FRAME problems and suggestions from the big topic here: http://forums.zuggsoft.com/forums/viewtopic.php?t=31101

I have played around with frames and was able to verify the problem with the size of frames being reset if the window was closed and then opened again via the frame command. In other words, if you did this:
Code:
#mxp <FRAME action="open" name="test1" height=15% width=20%>
#mxp <FRAME action="close" name="test1">
#mxp <FRAME action="open" name="test1">

then you would get a very tiny window on the screen called "test1".

I have fixed this bug for the next version. I also fixed a similar problem with docked (internal) frames. Also, you can now properly change the size/position of frames whether they are closed or open by issuing another open command. For example:
Code:
#mxp <FRAME action="open" name="test1" height=15% width=20%>
#mxp <FRAME action="open" name="test1" height=25% width=40% left=100 top=100>

will properly resize and reposition the "test1" frame. Unlike what I mentioned in the previous thread, this *will* override any user-defined position/size of the window. There was really no way to put the user under complete control over this. So yes, the MUD can override your user-defined layout in this case. Hopefully MUDs won't abuse this. If I can figure out a way to preserve the user layout then I might change this in the future. But it was very difficult to determine if the user had changed the size/position of the frame or not.

For the next version of CMUD, I have also added a new argument to the FRAME tag called "Dock". You can use the "Dock" attribute to specify the name of the window that you want to dock relative too. If omitted, it will use the current session window, just like it currently does. For example, you can now do this:
Code:
#mxp <FRAME action="open" name="test1" internal align="top">
#mxp <FRAME action="open" name="test2" align="right" dock="test1" width=20%>

This will create a 3-pane layout where test2 is docked on the right side of test1, and both windows are docked to the top of the main session window. Notice that when you use "dock" you don't need to use "internal".

MUD servers can use the SUPPORTS tag to query the FRAME tag to determine if it supports the Dock attribute. This should allow a MUD to determine if the client supports this attribute or not.

I have also fixed a bug with the % width/height specifiers. These were always using the *screen* width and height. That was good for floating windows, but not for docked windows. For docked (internal) windows, using a % will be relative to the size of the main MUD window, as expected.

I still couldn't reproduce the issue with the tick timer in frames, but I think these changes take care of what you were asking for. With these changes, the MUD should be able to control the layout for the user. The only downside currently is that if the user changes the sizes of the frames, then when they reconnect to the MUD, the MUD might override their size settings.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Fri Jun 27, 2008 6:38 pm   
 
It's a bit awkward participating on a forum that isn't all about user's flaming each other.. It's really quite a unique experience for me to be able to make a post and have it actually listened to, much less have my ideas implemented, especially so quickly. So basically, I guess that's just a big 'Thanks!' n.n

Anyways, I really appreciate these fixes and added functionality. I really ought to be able to do what I want with frames for the most part, regardless if the user is using zmud or cmud, which is great. I intend to support Pueblo, ZMud and CMud to the levels I can manage for each, so this is great news for me, as CMud is the most advanced of any of them.

Another thing I mentioned that you haven't yet mentioned is the ability to put 2 frames into a tab together. If you'll look at my image in the last thread for my CMud frame layout, you'll see that I have one particular frame (Container, perhaps? I'm not sure what you'd want to call it..) with 2 frames in tabs. One tab is the room descriptions and the other tab has 2 frames inside of itself: Map and Map key.

Perhaps:

Code:
#mxp <FRAME action="open" name="test1" internal align="top">
#mxp <FRAME action="open" name="test2" align="right" dock="test1" width=20%>
#mxp <FRAME action="open" name="test3" align="tab" dock="test1">
#mxp <FRAME action="open" name="test4" align="left" dock="test3" width=5%>


Where the 3rd line will create a tab in the same container for test1 and line 4 will create a docked window within that tab itself to the left of test3.


Also, I do know what you are saying about players should have final control. I agree completely, the only reason I suggested the 'OVERRIDE' tag was a simple solution if no other was possible/feasible. Perhaps what you can do is leave the IMAGE entity working as it does to override the player's custom settings if it tries to, UNLESS the player has checked an option off under their package preferences for that specific window that says 'Do not allow MUD to override my settings'. This way, the MUD can create and size the windows as needed for the player, then they can check off that option and resize them however they want to if they feel comfortable with it. If they end up having trouble with it or breaking their layout in a manage they don't feel they can fix, they can uncheck that option and have the MUD size them properly for them again.

In the same regard, the 'OVERRIDE' tag might still be a feasible option in that if the player is set not to allow the mud to resize their windows, if the OVERRIDE tag is present, CMud will instead pop up something like: 'The MUD is attempting to resize 'test1' and you currently have 'test1' locked. Would you like to allow this?'

I notice that in the other thread you said to make sure the tick timer wasn't turned on in the default preferences. I had assumed from the very start that this might be the case, but I can't -find- tick timer options anywhere that can be set to default settings for any window. Only specific to each window.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Jun 27, 2008 8:25 pm   
 
Yes, you can put two frames into a tab together. The syntax is this:
Code:
#mxp <FRAME action="open" name="test1" internal align="top">
#mxp <FRAME action="open" name="test2" align="client" dock="test1">

The "client" alignment type is what you want (although this doesn't work in the current CMUD or in zMUD...it is part of the improvements in CMUD 2.30).

I think your "override" option is similar in intent to the existing "persistent" option. The idea behind the "persistent" option is that existing windows/frames are not changed in size or position. So the specified top/left/width/height attributes only take effect when creating a *new* frame.

However, when I tested this, I found that the "persistent" option is broken and not working. Also I noticed that it isn't even documented. So I'm not actually sure what version of zMUD added that option. But I will check to see if it's easy to fix in CMUD. And at some point in the future I'll try to improve the MXP documentation, although I'm notoriously bad at giving a documentation a lower priority over programming (especially bug fixes).

On the tick timer problem, yes, I noticed that it's difficult to set the tick timer for the default settings. The easiest way to test it is to just run CMUD and press ESC to close the initial Sessions window. This gives you a window with just the defaults. If you see the tick timer running in the status bar, then you've got it enabled somehow by default. The more difficult part would be getting rid of that. The easiest way is to just rename/delete your DEFAULT.PKG file. You probably haven't changed any other default settings and this will restore the normal defaults to CMUD.

But definitely let me know what you learn. If there is a bug with the tick timer, I'd really like to get it fixed in 2.30 too. And I'm planning to release 2.30 early next week. That will be the last new version for a while as I start work on some mapper stuff.

While I really try to provide excellent customer support and fix bugs and respond to customer requests as fast as possible, I'll admit that you just caught me at a good time with this. I was already working in some other aspects of the MXP code, and I'm currently in a fast-turnaround bug-fixing phase. If you hadn't posted until next month, then you might have waited for a long time to get these improvements since I'd be working on the mapper then and not MXP.

But I still pride myself on providing software that is "customer driven". A majority of features in zMUD and CMUD are suggested by actual users, and I try to have a pretty good turnaround time for bug fixing. The hard part is getting enough testing to *find* the bugs in the first place. But this kind of customer support is what you get with Zuggsoft that you don't get with other companies or with free clients. It's really one of the big "features" that our customers pay for.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Fri Jun 27, 2008 9:08 pm   
 
Ahhh.. Very nice.. I didn't realize that the 'client' docking option would work that way.

Also, I do remember seeing something about the persistent tag somewhere at some point but at that point in time I didn't understand it. But yeah, if it behaves like you say it should in the next version, than that pretty much negates my ideas on any such override tag.

About the tick timer, I tried what you said on escaping out to the default window and yeah, it is running by default. I don't have any problem with deleting/renaming the default package, I'm just curious as to how this came about being set in the first place. The only way I can think of is when CMud imported by ZMud settings. All I know is I never set it that way by default.. :P I just renamed my default.pkg and am currently waiting to see if it fixes the problem.. And... It seems to have worked.

It really sounds like frames will work the way I need them to in the next release, so I'd say I'm pretty well satisfied.

And I know how you feel about documentation. It's never been my strong suit either. I can -do it- well enough, I just don't like to when there are other things that can be done that are actually productive rather than aesthetic.

Another thing I've noticed is that when using the command to try to close a frame, the frame just goes blank but doesn't actually close. Is this intentional or will it be fixed?

Also, I'm not sure if my previous mention of <frame action="redirect" name="_previous"> not working ever got heard. A minor thing that I am currently working around by just using <dest> but it's a bug nonetheless I think. "_top" also doesn't work, but I don't think it ever worked in ZMUD either. I always had to use _previous and make sure that my framing was handled in such a manner that _previous always put it back to the top window.

Addendum: I'm pretty sure I mentioned this before, but another thing that mildly irritates me, but is mostly a user-error sort of thing.. When you have frames open and you are for whatever reason, inside of one of those frames (I.e. you clicked a tab in one of them and it swaps CMuds focus to that frame) any commands sent through are sent to that frame instead of the main MUD window. I can see where this might be intentional in some cases, but in my particular implementation of frames, it does no good. The commad is shown on the frame and nothing happens since it was never actually sent to the MUD.. Just nitpicking I know, but in this particular scenario, I don't see why the command wouldn't just be sent straight to the MUD window.. (I'm referring, of course, to using keypresses, since these frames clearly don't have command lines.. For example, using the numpad to get around.)

Edit: That last point I brought up gives me a unique idea that is possibly once again, wishful thinking. Perhaps when a frame is created, the player/server can specify a tage as to whether or not to show the command line and what it prefixes when sending the information to the MUD.

Code:
<frame action="open" name="tell_faredar" prefix="tell faredar " floating command>


would essentially create a window in which players can have a conversation via tells by simply using the command line attached to that window without having to prefix every command with 'tell faredar' or 'reply'. If the prefix is omitted, than the commands are sent as-is to the main client window.
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Jun 28, 2008 5:20 am   
 
Glad to hear you found the problem with the tick timer. Not sure how it got that way. As you said, it's actually very hard to change the tick timer option in the default settings. CMUD no longer ships with any predefined DEFAULT.PKG file, so it must be something left over from the past. If you ever figure out how to make it happen again, let me know.
Quote:
try to close a frame, the frame just goes blank but doesn't actually close

Sounds like another bug. I'll check it. The intent is to close the window, but with the different window docking system in CMUD, it might not be working properly.

Regarding the frame focus: Each frame is the same as a "window" in the CMUD settings. Each window can have their own command line, and can even be connected to different servers/ports. In the recent version of CMUD (I think it was in 2.29), clicking on a frame/window that doesn't have a command line will no longer focus it. But even if another window has the focus, clicking back on the command line to enter your command should still send the command to the window attached to the command line and not the frame.

Oh, nevermind, you already said you weren't typing in the command line. Anyway, the change that prevents a window from being focused if it doesn't have a command line should fix the issue with the macro keys going to the wrong window too. But let me know if this still doesn't work in 2.29. It was a very recent bug fix.

Your last comment about frame "prefixes" is something that I'm planning when I add the integrated chat features in the future (after the mapper improvements though). The chat system will have lots of features for setting up chat windows with different prefixes like that, and I'll make sure to extend those new features to MXP to make them accessible from the MUD.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Sat Jun 28, 2008 5:42 am   
 
Quote:
Sounds like another bug. I'll check it. The intent is to close the window, but with the different window docking system in CMUD, it might not be working properly.


Yeah, it's a bug, then. And has been since even the first time I tried CMUD. When attempting to close the frame via the <frame> tag, the window just goes white and nothing happens. The window can still normally be closed with the 'x' but can be very inconvenient when you have 7 frames up and the MUD already has a predefined command to close all frames, like mine does. It's just one of those player simplicity things more than anything.

Also, on the same note, when the MUD sends a <FRAME open> command and the frame is already opened, the frame DOES stay open, but it is resized (Sort of) according to how you specify the size in the open tag. If you don't specify height/width/etc than it uses the default height/width that CMud uses when creating a frame without this information. The deal here is that it doesn't physically resize the windows/frames. If the frame is bigger than what it's tryingto resize to, than excess space is turned white just like when you close a window/frame with the <frame> tag. If the frame is smaller, than the frame is treated like it's too big. (I.e. Some text can be lost where you can never see it since it's off the edges of the true size of the frame.) This issue can be fixed by manually resizing the window, even if it's only a pixel and it properly resizes the frame and it works just like it should.

The fix for this? CMud shouldn't taken size arguments when an OPEN command is sent for a frame that is already open. :P If you don't understand what I am saying/can't reproduce this issue for yourself than I can post some detailed images on how it's happening to me. I realize that an easy way around this is just for the MUD not to send the "OPEN" command for a window that is already open, but in certain cases you may not be able to TELL if a certain window is already open. So this is a fairly legitimate bug.

Edit: Basically, you'll never see this issue if the frames are never manually resized by the player. But if the player DOES resize their window to be bigger, then the mud sends a subsequent "OPEN" command for the same window for whatever reason, it is improperly sized as stated above.

Quote:
Oh, nevermind, you already said you weren't typing in the command line. Anyway, the change that prevents a window from being focused if it doesn't have a command line should fix the issue with the macro keys going to the wrong window too. But let me know if this still doesn't work in 2.29. It was a very recent bug fix.


I'd already tried it in 2.29 before I even mentioned it. But even what you say shouldn't happen DOES happen. At least, for me it does. When I click into a seperate frame, even if it doesn't have a command line, focus is shifted to that frame. You can't type on the command line again until you shift focus back to the main window and hitting macros keys (Such as numpad directions) just sends the commands through to the focused window. Perhaps you fixed this in your latest version of the program? Because it's behaving just as poorly as ever for me in 2.29.

Quote:
Your last comment about frame "prefixes" is something that I'm planning when I add the integrated chat features in the future (after the mapper improvements though). The chat system will have lots of features for setting up chat windows with different prefixes like that, and I'll make sure to extend those new features to MXP to make them accessible from the MUD.


Great to hear. This will open up massive possibilities to me for making CMud players lives even easier.. If you can't tell already, I'm a huge fan of MXP.. Ever since it was introduced, I knew I wanted it implemented and it's looking even better now.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Sun Jun 29, 2008 10:12 pm   
 
Ah, another thought I had that would likely make everyones lives a bit easier and also help with the whole issue of MXP created frames overwriting each other. (Assuming you don't go with the whole 'Don't allow MXP to change my settings for this frame' option I suggested in the package editor for the specific windows.. Or even if you do..)

Code:
<FRAME action="QUERY" name="test">


Basically, I was thinking of a command or tag to the FRAME command that would basically tell the client to send a string to the MUD with all the information for that particular frame. This would allow the MUD client to do something like place a query for the details on all of the frames that it normally controls for the player and store it in a custom scheme in the MUD for the player to return to if they decide they want to tinker with different frame layouts. For example, they could manually configure their frames to look differently or try out some different preconfigured frame layouts defined by the MUD server and if they get stuck or decide they don't like it, they could simply issue the command to the MUD to return to their own personal scheme. I would love this idea as I could have 3-4 different layouts by default for players to try out if they like as well as let players define 3-4 custom schemes they've come up with for themselves and they would have a little bit of variety in how they could lay things out for different characters or just if they need a different layout for a different setup.. (Questing vs battle vs minigames for example)

Once again, this is perhaps wishful thinking, but I think it would greatly improve the power of MXP frames without even having to add much to the mxp spec other than the 'query' option on the action tag.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Mon Jun 30, 2008 1:53 am   
 
Something else I just noticed. Images used in the main window are found in/saved to 'C:\CMUD\<Mud name here>\images' whereas if they are called from within a frame, they are saved in 'C:\CMUD\images' (These are just example paths, obviously) It seems to me like you'd want the images being used by that specific MUD to be called from and saved to the images directory FOR that MUD. I tried looking through the individual window options for a place to set this directory and found nothing, so there seems to not even be any user control over this.

The main issue it would cause is if you use certain images in both the main window as well as MXP created windows. You'd end up with 2 copies of the image on your local hard drive.
Also, if the player played multiple muds that support images (Or even just use images for themselves via the #MXP command), there might be some conflicted interest if they use similar file names. Something that 1 player in a million might run across, so it's not a huge deal.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Mon Jun 30, 2008 5:24 am   
 
I just found out why the frames aren't saving their sizes/positions when you close out of the session. (Granted, you may have figured this out for yourself already) When you just close out the session, it doesnt save anything. But if you go to Layout->Save Session Layout, they will be saved next time you start up. Apparently the Auto-Save layout option doesn't work. (Which I'd already realized, but didn't realize that it had an effect on frame positioning/etc.)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jul 01, 2008 5:28 pm   
 
I couldn't reproduce the problem with the layout not saving, or with the Auto-Save layout not working. If the Auto-Save layout is enabled and I exit CMUD, then my frame layout was properly saved and restored when I opened the session again. So I guess I'll need an exact step-by-step procedure to reproduce that one.

On the frame focus issue, yes if you manually click on a frame, then the frame gets the focus. I can't actually do anything about that. A frame is a Windows object, just like an edit box or a button and when you click on anything like this in Windows, then Windows gives it the keyboard focus. If I mess with this, then you won't be able to click on a frame to undock it, resize it, or anything else. What was fixed in 2.29 is that sometimes CMUD would try to give the "current window" the keyboard focus when closing other windows, like the package editor. CMUD has a general routine in it called "UpdateFocus" that gives the command line the focus, and this is no longer called for windows that do not have a command line. But that doesn't prevent Windows itself from giving the frame the focus with you click on it. Sorry there isn't much I can do about that.

On the issue of the FRAME OPEN causing existing frames to resize, yes, that is actually a feature. If you only want your size/position information to be used the first time you *create* a new window, then use the PERSISTENT option for the frame. Although as I mentioned, this is currently bugged in v2.29 and fixed for v2.30.

The problem with the image directory storage is that CMUD allows multiple sessions and it isn't probably assigning your frame to a specific session. I'll see if I can fix that so that an MXP frame is properly associated with the correct session.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Tue Jul 01, 2008 6:41 pm   
 
I'm not sure how to give a step-by-step procedure that isn't already obvious for the layout issues. If I open a frame in a session (Any session) and resize it/place it somewhere/whatever, then close out of the session, it reverts back to where it was before UNLESS I manually tell it to save session layout. This happens to me in v 2.29 on any of the 4 different computers I've tried it on in any session, regardless if it's an opened session or newly created session. If it's working for you, I'm just not sure what's going on in all of the different computers I use that tend to cause this.. I'll give 2.30 a try when it comes out with high hopes that it'll fix it by itself and try to come up with some more detailed information if not.

As the for the focus issue, I understand what you are saying. Perhaps this can just be fixed in the future with the 'prefix' option we discussed before by allowing any commands sent into that window to simply instead be redirected to the main window. So that it doesn't necessarily have to lose focus, but a window with no command line or active connection in it really has no need for accepting commands/macro keys.

As for the open bug, I'll just either go with the persistent option or rewrite my MXP coding so as not to open already opened windows. This is where that 'query' action I was talking about for the frame element would come in handy. The MUD can check the client to see if the window is already open and if so, ignore it or send the "OPEN" command if not.
_________________
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:04 pm   
 
OK, we'll wait till 2.30 on this one. It's possible that I can't reproduce it because it's already fixed.

The "query" option is an interesting idea for the future of MXP, but not something I'll be able to do for 2.30.
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