comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Lack of KeyMods parameter in the ::MouseUp function call -> Feature request
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Lack of KeyMods parameter in the ::MouseUp function call -> Feature request [message #84603] Wed, 30 December 2015 15:25 Go to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I'm intensively using the FG event handler class. In doing so, I've come to a problem where I would like the ::MouseUp function to include information about the current keyMods. Currently, the functions ::MouseDown, ::MouseMotion and ::MouseWheel have it...

Let me explain why I think this is useful.
I have a polygon on an image. I would like to add a point to the polygon. To distinguish from the translation case, I use the "alt" key to identify modifications (or alt-erations) to the polygon. Therefore, pressing the alt-key and the left mouse button results in an added point. Since I'm not always good with my hand, I would like to be able to:

1) press down alt-key
2) press down left mouse button (a point is added)
3) move mouse (and see the added point moving with the mouse)
4) release the left mouse button
5) release the alt-key

Besides being useful, it is also "cool".

However, if I would like to "cancel" the add point operation if the alt-key is released *before* the release of the left mouse button. In other words, the following sequence should delete the point after step 4):

1) press down alt-key
2) press down left mouse button (a point is added)
3) move mouse (and see the added point moving with the mouse)
4) release the alt-key (the previously added point is deleted)
5) release the left mouse button

Since I cannot detect if alt is pressed when releasing the button, I cannot do this.

Can this please be added? I don't think that it is that much of an effort..
Re: Lack of KeyMods parameter in the ::MouseUp function call -> Feature request [message #92530 is a reply to message #84603] Tue, 05 January 2016 13:16 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Wednesday, December 30, 2015 at 4:25:08 PM UTC-7, Helder wrote:
> Hi,
> I'm intensively using the FG event handler class. In doing so, I've come to a problem where I would like the ::MouseUp function to include information about the current keyMods. Currently, the functions ::MouseDown, ::MouseMotion and ::MouseWheel have it...
>
> Let me explain why I think this is useful.
> I have a polygon on an image. I would like to add a point to the polygon. To distinguish from the translation case, I use the "alt" key to identify modifications (or alt-erations) to the polygon. Therefore, pressing the alt-key and the left mouse button results in an added point. Since I'm not always good with my hand, I would like to be able to:
>
> 1) press down alt-key
> 2) press down left mouse button (a point is added)
> 3) move mouse (and see the added point moving with the mouse)
> 4) release the left mouse button
> 5) release the alt-key
>
> Besides being useful, it is also "cool".
>
> However, if I would like to "cancel" the add point operation if the alt-key is released *before* the release of the left mouse button. In other words, the following sequence should delete the point after step 4):
>
> 1) press down alt-key
> 2) press down left mouse button (a point is added)
> 3) move mouse (and see the added point moving with the mouse)
> 4) release the alt-key (the previously added point is deleted)
> 5) release the left mouse button
>
> Since I cannot detect if alt is pressed when releasing the button, I cannot do this.
>
> Can this please be added? I don't think that it is that much of an effort...
>
> Cheers,
> Helder

Hi Helder,

It probably isn't too hard to add, but the problem is backwards compatibility. If we just add another argument then it will break existing event handlers. We can't add a keyword for the same reason. There might be a way to check the number of accepted arguments and make the appropriate call, but then the documentation becomes ugly.

So, I'll add it to the list of possible enhancements, but I wouldn't count on it making the cut.

But keep making suggestions!

-Chris
Re: Lack of KeyMods parameter in the ::MouseUp function call -> Feature request [message #92531 is a reply to message #92530] Tue, 05 January 2016 13:20 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, January 5, 2016 at 9:16:07 PM UTC, Chris Torrence wrote:
> On Wednesday, December 30, 2015 at 4:25:08 PM UTC-7, Helder wrote:
>> Hi,
>> I'm intensively using the FG event handler class. In doing so, I've come to a problem where I would like the ::MouseUp function to include information about the current keyMods. Currently, the functions ::MouseDown, ::MouseMotion and ::MouseWheel have it...
>>
>> Let me explain why I think this is useful.
>> I have a polygon on an image. I would like to add a point to the polygon. To distinguish from the translation case, I use the "alt" key to identify modifications (or alt-erations) to the polygon. Therefore, pressing the alt-key and the left mouse button results in an added point. Since I'm not always good with my hand, I would like to be able to:
>>
>> 1) press down alt-key
>> 2) press down left mouse button (a point is added)
>> 3) move mouse (and see the added point moving with the mouse)
>> 4) release the left mouse button
>> 5) release the alt-key
>>
>> Besides being useful, it is also "cool".
>>
>> However, if I would like to "cancel" the add point operation if the alt-key is released *before* the release of the left mouse button. In other words, the following sequence should delete the point after step 4):
>>
>> 1) press down alt-key
>> 2) press down left mouse button (a point is added)
>> 3) move mouse (and see the added point moving with the mouse)
>> 4) release the alt-key (the previously added point is deleted)
>> 5) release the left mouse button
>>
>> Since I cannot detect if alt is pressed when releasing the button, I cannot do this.
>>
>> Can this please be added? I don't think that it is that much of an effort...
>>
>> Cheers,
>> Helder
>
> Hi Helder,
>
> It probably isn't too hard to add, but the problem is backwards compatibility. If we just add another argument then it will break existing event handlers. We can't add a keyword for the same reason. There might be a way to check the number of accepted arguments and make the appropriate call, but then the documentation becomes ugly.
>
> So, I'll add it to the list of possible enhancements, but I wouldn't count on it making the cut.
>
> But keep making suggestions!
>
> -Chris

Hi Chris,
thanks for the answer. Just out of curiosity, what would be the problem of using a keyword? I thought that that would be the way to go to avoid backwards compatibility?

Cheers,
Helder
Re: Lack of KeyMods parameter in the ::MouseUp function call -> Feature request [message #92535 is a reply to message #92531] Wed, 06 January 2016 08:31 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Tuesday, January 5, 2016 at 2:20:35 PM UTC-7, Helder wrote:
> On Tuesday, January 5, 2016 at 9:16:07 PM UTC, Chris Torrence wrote:
>> On Wednesday, December 30, 2015 at 4:25:08 PM UTC-7, Helder wrote:
>>> Hi,
>>> I'm intensively using the FG event handler class. In doing so, I've come to a problem where I would like the ::MouseUp function to include information about the current keyMods. Currently, the functions ::MouseDown, ::MouseMotion and ::MouseWheel have it...
>>>
>>> Let me explain why I think this is useful.
>>> I have a polygon on an image. I would like to add a point to the polygon. To distinguish from the translation case, I use the "alt" key to identify modifications (or alt-erations) to the polygon. Therefore, pressing the alt-key and the left mouse button results in an added point. Since I'm not always good with my hand, I would like to be able to:
>>>
>>> 1) press down alt-key
>>> 2) press down left mouse button (a point is added)
>>> 3) move mouse (and see the added point moving with the mouse)
>>> 4) release the left mouse button
>>> 5) release the alt-key
>>>
>>> Besides being useful, it is also "cool".
>>>
>>> However, if I would like to "cancel" the add point operation if the alt-key is released *before* the release of the left mouse button. In other words, the following sequence should delete the point after step 4):
>>>
>>> 1) press down alt-key
>>> 2) press down left mouse button (a point is added)
>>> 3) move mouse (and see the added point moving with the mouse)
>>> 4) release the alt-key (the previously added point is deleted)
>>> 5) release the left mouse button
>>>
>>> Since I cannot detect if alt is pressed when releasing the button, I cannot do this.
>>>
>>> Can this please be added? I don't think that it is that much of an effort...
>>>
>>> Cheers,
>>> Helder
>>
>> Hi Helder,
>>
>> It probably isn't too hard to add, but the problem is backwards compatibility. If we just add another argument then it will break existing event handlers. We can't add a keyword for the same reason. There might be a way to check the number of accepted arguments and make the appropriate call, but then the documentation becomes ugly.
>>
>> So, I'll add it to the list of possible enhancements, but I wouldn't count on it making the cut.
>>
>> But keep making suggestions!
>>
>> -Chris
>
> Hi Chris,
> thanks for the answer. Just out of curiosity, what would be the problem of using a keyword? I thought that that would be the way to go to avoid backwards compatibility?
>
> Cheers,
> Helder

Hi Helder,

Well, if your routine doesn't currently accept keywords, and it's called with a keyword, then IDL will throw an error...

Cheers,
Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem with dist function in IDL
Next Topic: scientific image2

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:22:47 PDT 2025

Total time taken to generate the page: 0.00432 seconds