octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ChangeSet] print.m: support for figure handles


From: Ben Abbott
Subject: Re: [ChangeSet] print.m: support for figure handles
Date: Tue, 4 Mar 2008 19:36:03 -0500


On Mar 4, 2008, at 2:46 PM, John W. Eaton wrote:

On 29-Feb-2008, Ben Abbott wrote:

|
| On Feb 29, 2008, at 6:58 PM, Ben Abbott wrote:
|
| >
| > On Feb 29, 2008, at 5:24 PM, John W. Eaton wrote:
| >
| >> On 29-Feb-2008, Ben Abbott wrote:
| >>
| >> When you want to make a temporary change to some global state like
| >> the
| >> current figure, you should use unwind_protect to prevent the change | >> from sticking in case an error occurs or an interrupt arrives while
| >> the setting is in the changed state.  For example
| >>
| >> old_fig = get (0, 'currentfigure');
| >> unwind_protect
| >>   figure (arg);
| >>   ...
| >> unwind_protect_cleanup
| >>   if (ishandle (old_fig))
| >>     figure (old_fig)
| >>   endif
| >> end_unwind_protect
| >>
| >> jwe
| >
| > ahhh-ha ... very cool!
| >
| > I'll make the change!
| >
| > The indent between unwind_protect and the cleanup will mean nearly
| > all lines will be included in the changeset. Is that ok?
| >
| > Ben
|
| ok, the not so trivial changeset is attached ;-)

I applied this patch.

Should the handle be allowed in any position in the argument list?
Should there be an error if more than one figure handle or filename
argument is found?

Thanks,

jwe

I pondered that for a bit, but decided I had no motivation to place a restriction on the syntax.

.... hmmm .... actually that's not really so much the problem as would be the extra effort to do otherwise ;-)

If you'd prefer the syntax to be restricted, I can take care of it. Say the word!

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]