Re: setcurrent and buffer don't work together? [message #83600] |
Mon, 18 March 2013 09:25 |
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  |
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  |
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.
|
|
|