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

Home » Public Forums » archive » Re: setcurrent and buffer don't work together?
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: setcurrent and buffer don't work together? [message #83600] Mon, 18 March 2013 09:25
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
Thanks, Chris. I was just opening this thread to post something like
it, copied from GraphicsWin::SetCurrent.

On Mar 17, 1:42 pm, Chris Torrence <gorth...@gmail.com> wrote:
> Hi Paulo and jls,
> I'll fix this in the next release. Thanks for pointing it out. In the meantime, if you need it, you can just save the following code to a file called "graphicsbuffer__setcurrent.pro" [note there are 2 underscores]:
>
> pro GraphicsBuffer::SetCurrent
>   compile_opt idl2, hidden
>   oSystem = _IDLitSys_GetSystem(/NO_CREATE)
>   if (Obj_Valid(oSystem)) then $
>     oSystem->_SetCurrentTool, self.tool, /NO_NOTIFY
> end
>
> Cheers,
> Chris
> ExelisVIS
Re: setcurrent and buffer don't work together? [message #83612 is a reply to message #83600] Sun, 17 March 2013 09:42 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, March 15, 2013 5:28:45 PM UTC-6, Paulo Penteado wrote:
> On Mar 15, 8:00 pm, jls <jlsaba...@gmail.com> wrote:
>
>> One way around this might be to use the TARGET keyword with the PLOT
>
>> command, but this isn't an option:
>
>>
>
>> IDL> p = plot ( [0,1], target=2 )
>
>> % PLOT: Unknown property: TARGET
>
>
>
> Normally, this would be done with the current keyword:
>
>
>
> IDL> w1=window()
>
> IDL> w2=window()
>
> IDL> p=plot(/test,current=w1)
>
>
>
> However, this fails in the same way when the window is a buffer.
>
>
>
> I consider this limitation a bug.

Hi Paulo and jls,
I'll fix this in the next release. Thanks for pointing it out. In the meantime, if you need it, you can just save the following code to a file called "graphicsbuffer__setcurrent.pro" [note there are 2 underscores]:

pro GraphicsBuffer::SetCurrent
compile_opt idl2, hidden
oSystem = _IDLitSys_GetSystem(/NO_CREATE)
if (Obj_Valid(oSystem)) then $
oSystem->_SetCurrentTool, self.tool, /NO_NOTIFY
end

Cheers,
Chris
ExelisVIS
Re: setcurrent and buffer don't work together? [message #83615 is a reply to message #83612] Fri, 15 March 2013 16:28 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 15, 8:00 pm, jls <jlsaba...@gmail.com> wrote:
> One way around this might be to use the TARGET keyword with the PLOT
> command, but this isn't an option:
>
> IDL> p = plot ( [0,1], target=2 )
> % PLOT: Unknown property: TARGET

Normally, this would be done with the current keyword:

IDL> w1=window()
IDL> w2=window()
IDL> p=plot(/test,current=w1)

However, this fails in the same way when the window is a buffer.

I consider this limitation a bug.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Annular Zernike polynomials
Next Topic: HASH makes too many temporaries

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

Current Time: Wed Oct 08 15:33:20 PDT 2025

Total time taken to generate the page: 0.00775 seconds