About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Nov 29, 2009 10:00 pm   

[3.12 pro]#CLOSE and #WINDOW from within other settings (menus and aliases)
 
I sent an error report on it (might be two, seemed like it maybe wasn't going through so I filled out and sent twice), but if I use #CLOSE and #WINDOW from the command line to open/close an existing window there are no problems. If I try to do the same via the below, the AV is apparently caused when the #WINDOW command tries to retrieve the window data:

The window and all settings contained
Code:

<window name="Mines" commandline="false" statusbar="false" left="520" top="203" width="220" height="200" host="none" id="217">
  <uid>{97795C9B-2FCF-4411-BD48-64FE8718BAE6}</uid>
  <packages>Games|Aardwolf</packages>
  <class name="ButtonBar" id="192">
    <button name="btnMines" type="Toggle" autosize="false" width="37" height="23" autopos="false" left="0" top="16" image="C:\Documents and Settings\Owner\My Documents\My Games\CMUD\Aardwolf/bomb.bmp" priority="187" id="193">
      <caption>99</caption>
      <expr>1</expr>
    </button>
    <button name="btnStart" autosize="false" width="95" height="23" autopos="false" left="36" top="16" priority="26" id="194">
      <caption>Start</caption>
    </button>
    <button name="btnTime" type="Toggle" autosize="false" width="42" height="23" autopos="false" left="130" top="16" image="CLOCK" priority="20" id="195">
      <caption>999</caption>
      <expr>1</expr>
    </button>
  </class>
  <class name="MenuBar" id="196">
    <button name="btnGameMenu" type="Menu" autosize="false" width="43" height="15" autopos="false" left="0" top="0" toolstyle="true" priority="24" id="197">
      <caption>Game</caption>
      <value>Game</value>
    </button>
    <button name="btnHelpMenu" type="Menu" autosize="false" width="37" height="15" autopos="false" left="44" top="0" toolstyle="true" priority="22" id="198">
      <caption>Help</caption>
    </button>
    <class name="Game" submenu="true" id="199">
      <menu priority="121" id="200">
        <caption>New</caption>
      </menu>
      <menu priority="123" id="201">
        <caption>Beginner</caption>
      </menu>
      <menu name="btnSep1" priority="122" id="202">
        <caption>-</caption>
      </menu>
      <menu priority="124" id="203">
        <caption>Intermediate</caption>
      </menu>
      <menu priority="125" id="204">
        <caption>Expert</caption>
      </menu>
      <menu priority="126" id="205">
        <caption>Custom</caption>
      </menu>
      <menu name="btnSep2" priority="127" id="206">
        <caption>-</caption>
      </menu>
      <menu priority="128" id="207">
        <caption>Marks</caption>
      </menu>
      <menu priority="129" id="208">
        <caption>Color</caption>
      </menu>
      <menu priority="130" id="209">
        <caption>Sound</caption>
      </menu>
      <menu name="btnSep3" priority="131" id="210">
        <caption>-</caption>
      </menu>
      <menu priority="132" id="211">
        <caption>Best Scores</caption>
      </menu>
      <menu name="btnSep4" priority="133" id="212">
        <caption>-</caption>
      </menu>
      <menu priority="134" id="213">
        <caption>Exit</caption>
        <value>#close Mines</value>
      </menu>
    </class>
    <class name="Help" submenu="true" id="214"/>
  </class>
  <var name="ms" type="Record" id="215">beginner=*|time|intermediate= |custom= |mines|expert</var>
  <var name="pics" type="Record" id="216">bomb=C:\Documents and Settings\Owner\My Documents\My Games\CMUD\Aardwolf/bomb.bmp</var>
</window>


The alias used from commandline to open the above window
Code:

  <alias name="playgame" id="191">
    <value>#switch ($name = "") {#say %concat("Games available to play:",%cr,"   Mines")}
  (%lower($name) = "mines") {#window Mines}</value>
    <arglist>$name</arglist>
  </alias>
_________________
EDIT: I didn't like my old signature
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Nov 30, 2009 6:07 pm   
 
I was not able to get any error with your script, but you didn't really give a specific procedure. Here is what I did:

1) Opened CMUD, closed the Session window
2) Opened the Settings Editor
3) Copied the XML from the first code box above and pasted it into the tree view. This created the Mines window
4) Clicked on the Untitled window and copy/pasted the XML from the second code box to create the "playgame" alias
5) Closed the Settings Editor and selected the Mines window. Clicked the X button in the upper-right to close this window
6) In the Untitled window, I typed:
playgame Mines
and it properly opened the Mines tab.

So, please give me the modified procedure that shows the error.
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Mon Nov 30, 2009 6:45 pm   
 
BTW when I have opened another window (just create it to send to it text like 'tells you') CTRL+Q returned me 14, but when I close this window, CTRL+Q shows 9 ;|
So looks like another Window placed floating in some point make cMUD slowest :(
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Dec 01, 2009 12:22 am   
 
I do not see this on any of my computers. Here is what I did:

1) Run CMUD, close the Session window
2) Press Ctrl-Q. On my computer, the result is 4.3
3) On the command line, type "#WINDOW test" to create a test window
4) Press Ctrl-Q again. Now it says 3.9

In this case, it is faster because the main window has fewer lines to scroll when the Test window is docked to the top. So now, double-click on the Test window caption to undock it. Now press Ctrl-Q. Now my result is 4.6. This is only slightly slower because the Test window is floating over the main window and Windows needs to clip the text around the floating window, which makes the Windows screen update a bit slower.

But I'm certainly not getting the huge speed difference that you are, so try this in a blank session to make sure it's not a problem with your scripts.

Also, in the future be sure to give the *exact step-by-step procedure* for reproducing an issue. There are so many ways to do the same thing in CMUD that without the exact procedure, it's hard for me or anyone else to try and reproduce your problem.
Reply with quote
Yodous
Apprentice


Joined: 23 Jun 2004
Posts: 105
Location: Poland

PostPosted: Tue Dec 01, 2009 8:44 am   
 
Hi!
Of cours! When I did the same what You (close Session window and use CTRL+Q on this 'untiled' window that starts with cMUD) the tests ware almost the same (~1).
But when I did the test inside a session, with scripts:
1) After load the Session use the CTRL+Q. I suppose that the first fire the trigger parse them or smth so the result was 10.9
2) Use once more time CTRL+Q and get 9.5
3) On the command line, type '#Window test'. The new Window is docked on the top. The CTRL+Q still shows 9.5
4) Undock the test Window and place it near he mapper. CTRL+Q shows 13.1

There isn't any scripts, that involves test Window etc. So it seems, that only appear the window floating on the screen can slower cMud
Best Regards
Yodous
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