[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  The Mushclient can't draw MiniWindow.

The Mushclient can't draw MiniWindow.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Killunix   (12 posts)  [Biography] bio
Date Sun 05 Sep 2010 06:24 AM (UTC)
Message
I use the following code to drawing a window in mushclient,the version 4.43 show the window correct.all the upper version include 4.60 show nothing. I use the Immediate to test this. Is it has any other settings for drawing this? Thanks!

win = GetPluginID () -- get a unique name
WindowCreate (win, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
WindowShow (win, true) -- show it
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 05 Sep 2010 06:34 AM (UTC)
Message
See the release notes for version 4.46. In that there was a change to miniwindow creation:

http://www.gammon.com.au/scripts/showrelnote.php?version=4.46&productid=0


2. WindowCreate now returns two error messages:

eNoNameSpecified - a zero-length string was supplied as the window name
eBadParameter - the width or height of the window may not be negative


In your case you could check with the "check" function like this:


win = GetPluginID () -- get a unique name
check (WindowCreate (win, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white"))) -- create window
WindowShow (win, true) -- show it 


When I do that I get the message:

Run-time error
World: SmaugFUSS
Immediate execution
[string "Immediate"]:2: No name has been specified where one is required
stack traceback:
        [C]: in function 'error'
        [string "Check function"]:1: in function 'check'
        [string "Immediate"]:2: in main chunk


Your code would have worked in a plugin but in the immediate window GetPluginID () returns an empty string.

You can add something, eg.


win = GetPluginID () .. "main_window"


That works in a plugin and also in the Immediate window.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Killunix   (12 posts)  [Biography] bio
Date Reply #2 on Sun 05 Sep 2010 06:49 AM (UTC)
Message
Thanks, Now I can use the new version!
thanks
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,331 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]