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

Home » Public Forums » archive » Re: X-windows text events
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: X-windows text events [message #30030] Thu, 04 April 2002 08:52 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Niel Malan (Niel.Malan@aber.ac.uk) writes:

> The idea of my line-based text widget is that it should only select lines, return the selected line as GET_VALUE, and replace
> the selected line with SET_VALUE. I do that by capturing events from a text widget, examining the position of the
> cursor/selection, and then setting the selection to the beginning and end of that line. WIDGET_CONTROL's GET_VALUE and
> SET_VALUE then uses this selection.
>
> The compound widget works well, but there is some side-effect behaviour. When the widget is first started, behaviour is
> normal. However, once the compound-widget event handler has handled some events, events are generated for text selection
> attempts on all open X-windows. Sometimes this behavior disappears after working in MS windows, but returns once the event
> handler has handled events: I can't yet replicate this at will.
>
> The nett effect is that it is impossible to select text from other X-windows while my widget is running. This includes the
> IDLE and IDL online help.

Did I say "user did something wrong" theory? I meant
"IDL is nuts" theory. Sorry. :-(

I don't see anything at all wrong with the way
you wrote your compound widget. But I have to
tell you that it doesn't work so well on Windows
machines. (We might have been able to predict this.)

As I spent nearly two weeks testing one time, IDL
makes it difficult (impossible?) to select a line
of text from a text array in a text widget. There
must be something about the way lines end in Windows,
but the counting is WAY off, using the keywords you
use in your program. I find I have to select the line
twice to get the program to work properly. The first
time, it grabs characters from the line above in the
selection, although it doesn't report these extra
characters when it does the Get_Value thing.

Anyway, I don't see any of the odd sorts of things
you report. But if I did, it wouldn't surprise me
much. :-)

Cheers,

David

P.S. Let's just say I found list widgets handy for
selecting lines of text. :-)
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL FFT (spec -> interferogram)
Next Topic: X-windows text events

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

Current Time: Sat Oct 11 08:36:14 PDT 2025

Total time taken to generate the page: 0.24324 seconds