octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Changeset] uigetfile, uigetdir, uiputfile


From: Kai Habel
Subject: Re: [Changeset] uigetfile, uigetdir, uiputfile
Date: Thu, 18 Nov 2010 21:18:33 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100914 SUSE/3.1.4 Lightning/1.0b2 Thunderbird/3.1.4

 On 18.11.2010 20:55, John W. Eaton wrote:
On 18-Nov-2010, Kai Habel wrote:

| I have separated the fltk specific code from the common code as much as
| possible. The generic m-files uigetdir, uigetfile and uiputfile call the
| backend specific function __fltk_uigetfile__. So other backends could
| provide a similar function. If we have two or more backends available,
| we have to find a way to determine the 'right' backend and call the
| correct __xxx_uigetfile__ function. Or have you thought of other means?

We already do this with gnuplot/fltk using for example

     ## call the backend print script
     switch (get (opts.figure, "__backend__"))
     case "gnuplot"
       opts = __gnuplot_print__ (opts);
     otherwise
       opts = __fltk_print__ (opts);
     endswitch

Though maybe it should be

     opst = feval (sprintf ("__%s_print__", get_current_backend (), fcn), opts);

(with a suitable definition for get_current_backend) or even
encapsulated in a function like

   opts = __execte_backend_function__ ("print", opts);

?

jwe
The problem arises when a user has an octave with both backends available, but the backend for the current figure is gnuplot. Should the uigetfile decline to work, even though __fltk_uigetfile__ would work?

Currently it does work, as long as a fltk version is available even when the current figure is gnuplot.

Kai

P.S. I like the idea of the  __execte_backend_function__


reply via email to

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