Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ Problem with miniwindow hotspot under the PHP

Problem with miniwindow hotspot under the PHP

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


Posted by Yergo   Poland  (20 posts)  Bio
Date Fri 31 Oct 2008 02:57 PM (UTC)
Message
Hi there

When testing new features in mushclient I ran in such a problem: when clicking hotspot, mushlient is opening window informing me that there mas a "Typemismatch" error, and nothing else happens.

I'm using php 5.2.6. This is pack of files I'm trying to use:
http://eros.vlo.gda.pl/~bratex/arka/erreport.zip

I'm doing my best with English... Sorry ;)
Scripting: php (currently rewriting things to Lua)
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 31 Oct 2008 08:31 PM (UTC)
Message
Those callback functions expect a return value - PHP is picky about that.

Add to the end of the callback functions:


return 0;


I tested your script and that stopped the error message.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Yergo   Poland  (20 posts)  Bio
Date Reply #2 on Fri 31 Oct 2008 08:59 PM (UTC)

Amended on Fri 31 Oct 2008 09:29 PM (UTC) by Yergo

Message
Thanks Nick. Anyway it should be pointed when example in "Hotspot callback functions" part of http://www.gammon.com.au/mushclient/mw_hotspots.htm

Thanks once again :)

Edit:
Ok, but theres a new problem. In minutes there will be new files at the same location. The problem occurs when trying to increase size of mini - capturing mouse position ends when the miniwindow ends. I mean than when I release lmb far away from right miniwindow side, the mouse x-position returned with WindowInfo contains the most right pixel of mini position, not where mouse was released in real. So what to do, when I want to increase size with one, single, long move?

I'm doing my best with English... Sorry ;)
Scripting: php (currently rewriting things to Lua)
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 31 Oct 2008 09:48 PM (UTC)
Message
I have amended the documentation to make that clearer.

As for the resizing, I was about to make another post saying I did not think your code would work. There is presently no provision for dragging things in miniwindows, and the mouseup event will only apply if the mouse is released in the same miniwindow, which in your case is quite small.

The next version should have provision for dragging, which will make resizing windows, and moving them, practical.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Yergo   Poland  (20 posts)  Bio
Date Reply #4 on Mon 03 Nov 2008 11:19 AM (UTC)
Message
Ehh.. So I'm waiting for new version once again. "'Better' is the enemy of 'good'" ;D

I'm doing my best with English... Sorry ;)
Scripting: php (currently rewriting things to Lua)
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.


16,017 views.

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

Go to topic:           Search the forum


[Go to top] top

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