forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDS 5 @mousedown() bug!

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed Jun 18, 2003 2:59 pm    Post subject: VDS 5 @mousedown() bug! Reply with quote

This is what it says in the help file:

"Flags are L, M, R. Default L. Returns the state of the mentioned mouse button. If the button is down, it returns 1, if not it returns NULL. When specifying more than one flag, the return is a string of null or 1 separated by the standard VDS field separator. "

I put the @mousedown() function in a timer loop to check if the right mouse button is being pressed. Well (as in VDS 4) the following returns R which is NOT one of the correct returns. Or am I reading something wrong?

if @mousedown(R)
info @mousedown(R)
#do something
end

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jun 18, 2003 9:02 pm    Post subject: Reply with quote

This code works the same way with VDS 4 & 5.

Code:
DIALOG CREATE,New Dialog,-1,0,240,160
  DIALOG ADD,TEXT,This_is_a_test,63,78,,,This_is_a_test
  DIALOG SHOW
:loop
wait event,0
goto @event()
:timer
if @mousedown(R)
info @mousedown(R)
end
goto loop
:close
exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
sieber
Newbie


Joined: 01 Jul 2003
Posts: 13
Location: Germany

PostPosted: Tue Jul 01, 2003 4:06 pm    Post subject: Mousedown bug and popup window for VDS 4 and 5 Reply with quote

If you use the mousedown function to detecting if the rigth mouse was pressed and after this add a popup window -> you get trouble. You can simulate it with the Mousedown example or have a look the my example. If you use the mousedown example, please add the red line to the code:
....
if @mousedown(r)
dialog show,r
dialog popup, TESTPopup
else
.....

My example:
Code:
rem Demo for PopupMenu by RightMouse click
rem This is not working also for VDS Version 4.x
rem The internal event for the rightMouse event will not reset
rem start the script and press the right mouse in the list, now you always get the popup !
rem Close the test and start it again with F9 -> the popup will direct display !!
  option decimalsep,.
  DIALOG CREATE,New Dialog,-1,0,614,358
  DIALOG ADD,LIST,LIST1,35,24,213,242,,MULTI
  DIALOG ADD,STATUS,STATUS
  DIALOG SHOW
  list add,list1,"line 1"
  list add,list1,"line 2"
  list add,list1,"line 3"
  %%Counter = 0
:loop
  wait event,0.5
  %E = @event()
  goto %E
 
:TIMER
  %%Counter = @succ(%%Counter)
  %%Focus = @focus()
  if @equal(%%focus,LIST1)
     %%mousedown = @mousedown(R)
     if %%mousedown
        dialog popup,Popupwindow
        dialog set,status, Mouse <%%mousedown> Count <%%Counter>
     end
  end
goto loop
 
:popupwindowmenu
goto loop

:close
stop
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Jul 01, 2003 4:23 pm    Post subject: Reply with quote

Hi Sieber! Hi

Welcome to VDSWORLD!

Thank you for your bug reports. Smile However, I just wanted to let you
know that you can use the [code] BBCode tag to highlight your code and
make it easier to read. I changed it in your example above for you already. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
sieber
Newbie


Joined: 01 Jul 2003
Posts: 13
Location: Germany

PostPosted: Wed Jul 02, 2003 6:17 am    Post subject: Reply with quote

Yes

Hi, thank you for this information.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports 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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group