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

Home » Public Forums » archive » Re: IDL 8 Questions
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: IDL 8 Questions [message #72627] Wed, 22 September 2010 07:41
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Well, there are no buttons at the bottom of this widget
> window to even restore the plot to its original
> condition. :-(

Ah, yes I see.

> Here is something else that is weird. If I start
> IDL 8 and just compile and run "TEST", then the
> window appears, but it is *black*. Something only
> appears in it if I put my cursor into the window.

On my box it appears fine the first time. It's slow (takes about a second to appear) but it appears without any
interaction on my part.

IDL> print, !version
{ x86 linux unix linux 8.0 Jun 18 2010 32 64}

> After I put my cursor into the window, any subsequent
> times I run it, the plot appears normally. We are going
> to have to train people to "get IDL up to speed". :-(

Oh yes. And this is just one speed bump. I wonder if ITTVIS uses the traffic calming methodology of software
development.... (if any ITTVIS developers are reading this, I'm just kidding! Blame the managers! :o)

On the plus side it'll breathe new life into the old sultana as new neuron connections are made to get around the
confusion. Like brushing your teeth with your *other* hand. :oD

cheers,

paulv
Re: IDL 8 Questions [message #72628 is a reply to message #72627] Wed, 22 September 2010 07:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

>
> David Fanning wrote:
>> David Fanning writes:
>>
>>> PRO Test_EV, event
>>> Help, event, /Structure
>>> END
>>>
>>> PRO Test
>>>
>>> tlb = Widget_Base()
>>> draw = Widget_Window(tlb, XSIZE=400, YSIZE=400, $
>>> BUTTON_EVENTS=1)
>>> Widget_Control, tlb, /REALIZE
>>> Widget_Control, draw, Get_Value=window
>>> window.select
>>> p = plot(findgen(11), color='red', /CURRENT)
>>> XManager, 'test', tlb, /No_Block, Event_Handler='test_ev'
>>> END
>>
>> Sorry, I forgot what I was writing about. :-)
>>
>> So, that program above gives me a window, and I want
>> to do something in the window. Maybe draw a rubberband
>> box around some data points to do a statistical
>> calculation of some kind.
>>
>> When I click inside the plot, I can move the plot!
>> Hooray! But, I don't WANT to move the plot. :-(
>
> Yeah, I actually find that annoying. Why would I want to move the plot within a window?
>
> Anyway, when I've used plot(), if I hold the shift key down, a zoom-rubberband box appears. I think that should be the
> default and the plot-move action the one made active using the shift key. I would also like the middle mouse button to
> back out the zooming-steps, and the right mouse button return the plot to the original scaling (I know the window button
> down the bottom does that but I don't want to have to move my mouse all the way down there everytime I want to rescale
> -- my wrist and forearm muscles are getting sore!)

Well, there are no buttons at the bottom of this widget
window to even restore the plot to its original
condition. :-(

Here is something else that is weird. If I start
IDL 8 and just compile and run "TEST", then the
window appears, but it is *black*. Something only
appears in it if I put my cursor into the window.

After I put my cursor into the window, any subsequent
times I run it, the plot appears normally. We are going
to have to train people to "get IDL up to speed". :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL 8 Questions [message #72630 is a reply to message #72628] Wed, 22 September 2010 07:11 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> David Fanning writes:
>
>> PRO Test_EV, event
>> Help, event, /Structure
>> END
>>
>> PRO Test
>>
>> tlb = Widget_Base()
>> draw = Widget_Window(tlb, XSIZE=400, YSIZE=400, $
>> BUTTON_EVENTS=1)
>> Widget_Control, tlb, /REALIZE
>> Widget_Control, draw, Get_Value=window
>> window.select
>> p = plot(findgen(11), color='red', /CURRENT)
>> XManager, 'test', tlb, /No_Block, Event_Handler='test_ev'
>> END
>
> Sorry, I forgot what I was writing about. :-)
>
> So, that program above gives me a window, and I want
> to do something in the window. Maybe draw a rubberband
> box around some data points to do a statistical
> calculation of some kind.
>
> When I click inside the plot, I can move the plot!
> Hooray! But, I don't WANT to move the plot. :-(

Yeah, I actually find that annoying. Why would I want to move the plot within a window?

Anyway, when I've used plot(), if I hold the shift key down, a zoom-rubberband box appears. I think that should be the
default and the plot-move action the one made active using the shift key. I would also like the middle mouse button to
back out the zooming-steps, and the right mouse button return the plot to the original scaling (I know the window button
down the bottom does that but I don't want to have to move my mouse all the way down there everytime I want to rescale
-- my wrist and forearm muscles are getting sore!)

cheers,

paulv



> Moreover, I don't get those events (motion events?)
> in my event handler. How am I suppose to program with
> these things? Or, am I?
>
> Also, if I click *outside* the plot, the window
> itself draws a rubberband box. How did it know
> that's what I was thinking about!? VERY cool! :-)
>
> Cheers,
>
> David
>
>
Re: IDL 8 Questions [message #72634 is a reply to message #72630] Tue, 21 September 2010 21:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> PRO Test_EV, event
> Help, event, /Structure
> END
>
> PRO Test
>
> tlb = Widget_Base()
> draw = Widget_Window(tlb, XSIZE=400, YSIZE=400, $
> BUTTON_EVENTS=1)
> Widget_Control, tlb, /REALIZE
> Widget_Control, draw, Get_Value=window
> window.select
> p = plot(findgen(11), color='red', /CURRENT)
> XManager, 'test', tlb, /No_Block, Event_Handler='test_ev'
> END

Sorry, I forgot what I was writing about. :-)

So, that program above gives me a window, and I want
to do something in the window. Maybe draw a rubberband
box around some data points to do a statistical
calculation of some kind.

When I click inside the plot, I can move the plot!
Hooray! But, I don't WANT to move the plot. :-(

Moreover, I don't get those events (motion events?)
in my event handler. How am I suppose to program with
these things? Or, am I?

Also, if I click *outside* the plot, the window
itself draws a rubberband box. How did it know
that's what I was thinking about!? VERY cool! :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL 8 Questions [message #72635 is a reply to message #72634] Tue, 21 September 2010 21:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paulo Penteado writes:

>> 1. In the IDLDE, why are the tabs now on the *bottom*
>> of the windows and not the *top*!? Can I change the
>> position? >
> Preferences->General->Appearance->View tab positions.

Hooray! I knew this had to be *somewhere*! Thanks!

>> 2. I thought I would learn about the NG by porting
>> some of my DG applications. But, yowzer! Most of the
>> applications I wanted to port use some kind of
>> interaction in the graphics window. For example,
>> draw a rubberband box, move a line, window and
>> threshold, things like that. I can't seem to find
>> any way to do those kinds of things and use the
>> new graphics. Am I missing something? Are the
>> new graphics strictly for display and not for
>> interaction?
>
> There is the new widget_window, somewhat like a draw widget, but to
> contain new graphics.

Yeah, something like it. But here is a very simple
widget program. Running it produces *two* windows.
A window that looks like a normal IDL graphics window
and one that has a plot in it. The one that has the
plot in it is NOT the one that produces events when
I click in it. (This code is almost verbatim from
the on-line IDL help.) Any ideas?

PRO Test_EV, event
Help, event, /Structure
END

PRO Test

tlb = Widget_Base()
draw = Widget_Window(tlb, XSIZE=400, YSIZE=400, $
BUTTON_EVENTS=1)
Widget_Control, tlb, /REALIZE
Widget_Control, draw, Get_Value=window
window.select
p = plot(findgen(11), color='red')
XManager, 'test', tlb, /No_Block, Event_Handler='test_ev'
END


After I wrote this, I find that I can get it to work
if I set the CURRENT keyword on the plot function. But,
I thought window.select made that window the current window.
(This is what the on-line help says.) But I can't find a
select property for the window object in the help anywhere.
Any insight into this?

Thanks,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL 8 Questions [message #72636 is a reply to message #72635] Tue, 21 September 2010 20:08 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Sep 21, 11:40 pm, David Fanning <n...@dfanning.com> wrote:
> 1. In the IDLDE, why are the tabs now on the *bottom*
> of the windows and not the *top*!? Can I change the
> position? I feel like I'm becoming dyslexic as I
> switch between IDL 7.1 (to get some work done) and
> IDL 8 (to welcome the future).

Preferences->General->Appearance->View tab positions.

> 2. I thought I would learn about the NG by porting
> some of my DG applications. But, yowzer! Most of the
> applications I wanted to port use some kind of
> interaction in the graphics window. For example,
> draw a rubberband box, move a line, window and
> threshold, things like that. I can't seem to find
> any way to do those kinds of things and use the
> new graphics. Am I missing something? Are the
> new graphics strictly for display and not for
> interaction?

There is the new widget_window, somewhat like a draw widget, but to
contain new graphics.

>
> 3. I have noticed when I start Catalyst applications
> up (and, remember, these are all IDL objects) that
> sometimes they work, and sometimes they fail with
> strange errors. I'm not sure what is happening with
> this yet, but has anyone seen strangeness when working
> with lots of IDL objects? (I did discover a real bug
> in one program, but the others I have investigated
> seem to disappear if I reset the session and compile
> again. I know this sounds like programmer error, but
> I have reasons to think not.)

I have not noticed any problems in my Catalyst applications. In the
Tech Preview, there were some rare problems with objects getting
garbage collected when they should not (which manifested when running
IDLDoc), but those were fixed in the release version.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Coyote and Catalyst Libraries Available on SVN Repository
Next Topic: call ENVI menu routines

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

Current Time: Sat Oct 11 08:04:59 PDT 2025

Total time taken to generate the page: 1.19584 seconds