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

Home » Public Forums » archive » Object Graphics when using 'stop'
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: Object Graphics when using 'stop' [message #30634 is a reply to message #30555] Mon, 13 May 2002 14:36 Go to previous messageGo to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
David Fanning's post advising /BLOCK is brilliant! There are two bodies of
code
that implement the main event loop in IDL. The one that runs when there is
a blocking
widget is written in .pro (xmanger.pro). We know that .pro code can be run
when IDL
is stopped. That is why the dist rountine, for example, can be invoked.
When we ask
for a blocking widget, we cause IDL to use the .pro version of its main
event loop.
That code, just like any other .pro code, runs, and we can interact with
widgets, rotate,
etc. as usual.

Ignore my post about "dbov", which was a wrapper to xObjView. Just invoke
xObjView
with /BLOCK instead. Much better than a cartoon flip-book!

-Paul


"Paul Sorenson" <aardvark62@msn.com> wrote in message
news:3cdc2db1$1_3@corp-goliath.newsgroups.com...
> The offending widget programs are written in such a way that they never
draw
> their graphics until they receive an expose event. xObjView currently has
> the same weakness. Perhaps a clever fix could be put into these programs.
> Until then here is a lame hack I use. Its a wrapper to xObjView.
>
> pro dbov, oObj, _extra=e
> ;
> ;Procedure dbov: "debug objview". Provide an invocation of xobjview
> ;that is useful when IDL is stopped (e.g. at a breakpoint). Widget
> ;programs don't run (i.e. respond to events) when IDL is stopped.
> ;xObjView is a widget program. If it is invoked when IDL is stopped,
> ;its graphic window remains blank because it is waiting for an expose
> ;event which never comes. Procedure dbov forces an extra draw to
> ;guarantee that the initial view of oObj is drawn.
> ;
> xobjview, oObj, tlb=tlb, _extra=e
> xobjview, refresh=tlb
> end
>
> Paul Sorenson
> Gun For Hire
> aardvark62@msn.com
>
> "Rick Towler" <rtowler@u.washington.edu> wrote in message
> news:abgtdg$1kks$1@nntp6.u.washington.edu...
>> Ahhh, widgets....
>>
>> Issuing the STOP command stops xmanager's ability to process events.
> Since
>> OG widget programs rely on events to draw the view to the window this
> never
>> happens and you get the black window of despair. Direct graphics widget
>> programs will possibly draw the initial plot but will not be able to
> process
>> events either.
>>
>> I can't explain the details but I'm sure someone else in the group can.
>>
>> A non widget program will run as expected after issuing a stop. I
created
> a
>> simple non-widget OG program that I could pass data to plot after
issuing
> a
>> stop. You could craft yourself some nice little tools to do line and
>> surface plots which automagically scale and rotate objects. You lose
the
>> ability to manipulate them and cleanup is awkward. You would probably
> have
>> to use READ to wait for a keypress before destroying the objects.
>>
>> Or maybe you just look at your data using DG. So that's why they are
>> keeping DG around....
>>
>> -Rick
>>
>>
>> "Randall Skelton" <rhskelto@atm.ox.ac.uk> wrote in message
>> news:Pine.LNX.4.33.0205101048540.16883-100000@mulligan.atm.o x.ac.uk...
>>> With regard to more context, imagine a procedure aptly named 'test':
>>>
>>> PRO TEST
>>> DATA = BESELJ(SHIFT(DIST(40),20,20)/2,0)
>>> STOP
>>> END
>>>
>>> When I run this in IDL I get:
>>>
>>> IDL> test
>>> % Compiled module: TEST.
>>> % Compiled module: DIST.
>>> % Stop encountered: TEST 5 /blah/.../blah/test.pro
>>>
>>> If I try and plot 'data' with an object graphics routine like
>>> 'fsc_surface', or any of the RSI example code 'show3_track',
>>> 'test_surface' all I get is a black window? Moreover, all of these
>>> routines have built-in data (in the event that the user doesn't pass
an
>>> array) and even this fails to display when my routine is stopped. Of
>>> course, once I continue the program and allow it to finish, everything
> is
>>> fine and the object-graphics window fills with the expected surface.
>>>
>>> Any help would be greatly appreciated!
>>>
>>> Cheers,
>>> Randall
>>>
>>> IDL 5.3 (soon to be 5.5); RH Linux 7.x; XFree 4.0.3
>>>
>>> On Fri, 3 May 2002, Rick Towler wrote:
>>>
>>>> Hi Randall,
>>>>
>>>> Can you provide some more context? I just stopped an OG program,
>>>> manipulated objects and drew the window. Is that what you are
trying
> to
>> do?
>>>>
>>>> -Rick
>>>>
>>>>
>>>> "Randall Skelton" <rhskelto@atm.ox.ac.uk> wrote in message
>>>>
news:Pine.LNX.4.33.0205021605500.27169-100000@mulligan.atm.o x.ac.uk...
>>>> > Hi all,
>>>> >
>>>> > I'm using IDL 5.3 under linux and I have a curious question. For
>>>> > perspective, I tend to do most of my coding from the command line
> and
>> not
>>>> > the gui (yes, I do use the 'stop' command a lot). I routinely
check
>> the
>>>> > contents of variables with 'print' and 'plot' commands to
determine
> if
>> my
>>>> > calculations look reasonable. My problem is, once I have issued a
>> 'stop'
>>>> > command I cannot use object graphics to plot anything. All I get
is
> a
>>>> > black background window that is usually dissociated from xmanager.
>> I'm
>>>> > sure there is a good reason for this but I'm stymied. Any
thoughts?
>>>> >
>>>> > Cheers,
>>>> > Randall
>>>> >
>>>>
>>>>
>>>>
>>>
>>
>>
>
>
>
>
> -----------== Posted via Newsgroups.Com - Uncensored Usenet News
==----------
> http://www.newsgroups.com The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Ulimited Fast Downloads - 19 Servers
=-----




-----------== Posted via Newsgroups.Com - Uncensored Usenet News ==----------
http://www.newsgroups.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Ulimited Fast Downloads - 19 Servers =-----
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DLM memory space behavior.
Next Topic: Re: CURVEFIT.PRO standard deviations?

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

Current Time: Sat Oct 11 15:31:17 PDT 2025

Total time taken to generate the page: 2.88016 seconds