bugGNU Octave - Bugs: bug #31583, pre-register available backends

 
 

bug #31583: pre-register available backends

Submitter:  Ben Abbott <bpabbott>
Submitted:  Mon 08 Nov 2010 09:45:35 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Ben Abbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 09 Dec 2011 04:20:11 PM UTC, comment #6: 

I checked in the following changeset so that now available_graphics_toolkits gives you a list of available toolkits before they are loaded.

http://hg.savannah.gnu.org/hgweb/octave/rev/e3bed294b117

John W. Eaton <jwe>
Group administrator
Thu 09 Dec 2010 12:59:48 PM UTC, comment #5: 

The PKG_ADD approach does the job for me.

Does this imply that the function that adds backend names to the list will be public?

Ben Abbott <bpabbott>
Group Member
Thu 09 Dec 2010 07:48:40 AM UTC, comment #4: 

I don't want to have to instantiate/initialize a backend to know whether it is available.  I would like to separate the idea of registering a backend as available (just adding a name to a list) from the initialization of a backend.  Then I think we could just have a function that could be called from a PKG_ADD file that would add the name of the backend to the list of available backends.  Does that make sense?

John W. Eaton <jwe>
Group administrator
Mon 06 Dec 2010 09:29:43 PM UTC, comment #3: 

I like the idea of set/get.

The figues already have a _backend_ property. Should the same property be added to the root object?

Since configure detects the presence of FLTK, would it be possible to use the C preprocessor to determine which backends are permissible as values?


Ben Abbott <bpabbott>
Group Member
Mon 06 Dec 2010 05:20:40 PM UTC, comment #2: 

It seems like overkill to have to instantiate a backend just to list it.  However, some way of knowing what backends are available would be valuable.  Currently, the native backend is a sort of Heisenberg functionality; you don't know if it exists until you go and actually use it.  This is good in preventing a feature that is not quite ready for general distribution from seeing a lot of usage except by people in the know.  However, the FLTK backend seems pretty advanced and it would not be a bad thing if more people started using it and finding any errors in the code.

I completely agree that "available_backends" is not very descriptive.  I assume Matlab has only it's own backend and therefore there is no precedent to follow.  Do we want to open a discussion on the maintainers list for a possible replacement name?  Here are some names that I like:
plot_engine
plot_renderer
graphics_engine
graphics_renderer

It might be nice to incorporate the set/get functionality into a single function as well.  Currently one uses available_backends to see a list of renderers and backend(NAME) to set the actual renderer.  What if backend, without any input/output arguments, returned the list of available backends.  backend with a single output argument would return the currently selected backend.  backend (NAME) would set the desired renderer.

Rik <rik5>
Group administrator
Tue 09 Nov 2010 02:47:30 AM UTC, comment #1: 

Currently, registering a backend as "available" requires creating an instance of the backend.  Do we really want to require that just to list the possible graphics backends?  If so, then it is probably a fairly simple change, but if not, it looks like there is some work to do to disentangle the idea of announcing that a backend is present from the act of creating a backed object.

Also, I'm not sure that "available_backend" and "backend" is the best terminology.  We should probably be referring to "graphics_renderer", or "graphics_toolkit" or something similar instead of just "backend", which doesn't indicate at all that it has anything to do with graphics.

John W. Eaton <jwe>
Group administrator
Mon 08 Nov 2010 09:45:35 AM UTC, original submission:  

This was mentioned on the developers list, but I thought I'd add an item to the tracker so that it doesn't get forgotten.

Can the function, available_backends, return all backends that are actually available (gnuplot as well as all native backends).

For example, can "fltk" be indicated as available, prior to being enabled.

Ben Abbott <bpabbott>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by bpabbott (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-09 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2011-03-29 rik5 Dependencies- bugs #32823 is dependent
    2010-12-06 rik5 CategoryNone Plotting
        Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code