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

Home » Public Forums » archive » Re: Counting Clicks in List Widgets
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
Re: Counting Clicks in List Widgets [message #79240] Thu, 09 February 2012 08:55
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian J. Daniel writes:

> I have the same behavior on Mac OSX running IDL 8.0.

OK, so it looks like this is a UNIX issue in which
Carriage Return <=> clicks=2.

Thanks!

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Counting Clicks in List Widgets [message #79241 is a reply to message #79240] Thu, 09 February 2012 08:03 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
On Feb 9, 8:08 am, ameigs <andyme...@gmail.com> wrote:
> On Feb 9, 2:37 am, David Fanning <n...@idlcoyote.com> wrote:
>
>
>
>
>
>
>
>
>
>> Folks,
>
>> I ran into an interesting little, uh, feature
>> today. In the Coyote Library there is a small
>> dialog widget called a List_Selector. It just
>> allows the user to specify items in a list and
>> select one or more of them, returning the selected
>> items to the user.
>
>>    selectedItems = List_Selector(['cow', 'dog', 'coyote'])
>
>> I set this up so that if the user double clicks the list
>> item, it acts as if the user had clicked the Accept
>> button. I check for this by looking at event.clicks.
>> If the number is 2, I do my thing.
>
>> Works perfectly on Windows machines. But on LINUX
>> machines (and possible all UNIX machines, don't know)
>> it behaves differently. What happens is that if the
>> user instead of clicking the list item twice, just
>> physically selects the carriage return key while
>> the cursor is in the list, the event.clicks field
>> is set to 2!
>
>> I don't know if this is a bug or not. It is
>> certainly NOT documented anywhere that a CR will
>> cause a double click. Or even that it will cause
>> an event!
>
>> I'm going to fix the program by just ignoring
>> the clicks for non-Windows machines, but I'm
>> curious to know how wide-spread the problem might
>> be. And, especially, if this is a problem on Macs.
>
>> Could someone with a non-Windows machine and the
>> Coyote Library just try the command above and let
>> me know what happens if you hit the CR key when
>> the list is on the display. Thanks!
>
>> Cheers,
>
>> David
>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> David,
>
> Running idl7.1.1 on some ancient-ish version of Fedora here at JET. If
> the widget has focus but no item clicked on, the the widget disappears
> and the value is the first element in the list. If item selected, the
> <cr> then that value returned. If multiple selected with shift, then
> last one clicked is the value returned.
>
> Andy

I have the same behavior on Mac OSX running IDL 8.0.

-B
Re: Counting Clicks in List Widgets [message #79242 is a reply to message #79241] Thu, 09 February 2012 05:08 Go to previous message
ameigs is currently offline  ameigs
Messages: 12
Registered: March 2009
Junior Member
On Feb 9, 2:37 am, David Fanning <n...@idlcoyote.com> wrote:
> Folks,
>
> I ran into an interesting little, uh, feature
> today. In the Coyote Library there is a small
> dialog widget called a List_Selector. It just
> allows the user to specify items in a list and
> select one or more of them, returning the selected
> items to the user.
>
>    selectedItems = List_Selector(['cow', 'dog', 'coyote'])
>
> I set this up so that if the user double clicks the list
> item, it acts as if the user had clicked the Accept
> button. I check for this by looking at event.clicks.
> If the number is 2, I do my thing.
>
> Works perfectly on Windows machines. But on LINUX
> machines (and possible all UNIX machines, don't know)
> it behaves differently. What happens is that if the
> user instead of clicking the list item twice, just
> physically selects the carriage return key while
> the cursor is in the list, the event.clicks field
> is set to 2!
>
> I don't know if this is a bug or not. It is
> certainly NOT documented anywhere that a CR will
> cause a double click. Or even that it will cause
> an event!
>
> I'm going to fix the program by just ignoring
> the clicks for non-Windows machines, but I'm
> curious to know how wide-spread the problem might
> be. And, especially, if this is a problem on Macs.
>
> Could someone with a non-Windows machine and the
> Coyote Library just try the command above and let
> me know what happens if you hit the CR key when
> the list is on the display. Thanks!
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")


David,

Running idl7.1.1 on some ancient-ish version of Fedora here at JET. If
the widget has focus but no item clicked on, the the widget disappears
and the value is the first element in the list. If item selected, the
<cr> then that value returned. If multiple selected with shift, then
last one clicked is the value returned.

Andy
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Counting Clicks in List Widgets
Next Topic: Difficulty with N_ELEMENTS command

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

Current Time: Wed Oct 08 15:28:38 PDT 2025

Total time taken to generate the page: 0.00434 seconds