octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Changeset] uigetfile, uigetdir, uiputfile


From: John W. Eaton
Subject: Re: [Changeset] uigetfile, uigetdir, uiputfile
Date: Thu, 18 Nov 2010 14:55:07 -0500

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


reply via email to

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