Menu

#55 taurusgui: implement more selective load of settings

unassigned
waiting
None
feature-request
2015-03-30
2014-03-14
No

A mechanism for excluding only certain widgets from loading the settings from the ini file would be nice (e.g., with a filter in a --fail-proof like command)

For a motivation, see this extract from an internal email at Alba:

On Thu 13 March 2014 16:25:29 Marc Rosanes wrote:
> Hi Controls,
> 
> I have found a problem when trying to modify a personalized panel from
> in a taurusgui in mistral (ctbl09light). If you encounter the problem
> in your gui's in the future maybe the mail could be useful for you.
> For doing so I have modified the config.xml adding a new attribute to
> this personalized panel, and when trying to recharge the .xml the GUI
> could not charge and it crashed.
> 
> What has happened and how to reproduce the problem:
> 
> - Create a new panel 'foo_panel' (taurusform) inside a taurusgui, and
> export it from the taurusgui to a config.xml
> 
> - Close the GUI.
> 
> - Modify the config.xml adding new attributes to 'foo_panel'
> 
> - Open the GUI: the GUI crashes when trying to apply the modifications
> to the 'foo_panel' because in conflicts are found between the
> 'foo_panel' configuration in config.xml and in taurusgui.ini

This is just a particular case of a known general issue with the 
settings (.ini) VS config files (config.{py,xml}) in taurus.

The problem is that first the config files are loaded and then the 
ini file overwrites the settings. If there is an inconsistency, sometimes 
it can give an exception.

> How to solve it:
> 
> - go to /.config/ALBA/taurusgui.ini

Just a clarification:
 "go" here means "open with taurusconfigbrowser"

> 
> - Delete in the .ini the 'foo_panel' that we have created: delete it
> from all perspectives.
> 
> - Reopen the taurusgui
> 
> - Now the GUI can be opened and the 'foo_panel' that we have created
> applies the modifications without problems.
> 

A simpler but coarser workaround is  to simply use the "--fail-proof" 
parameter when calling the taurusgui. This will load the gui without 
loading the .ini, BUT  than when closing, the ini will be overwritten, 
so if there is something in there that you want, you may want to make 
a copy first.

Discussion

  • Carlos Pascual

    Carlos Pascual - 2014-07-08
    • Milestone: Jul14 --> Jan15
     
  • Carlos Pascual

    Carlos Pascual - 2015-02-03
    • Milestone: Jan15 --> unassigned
     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/142/

    Can't be converted:

    • _category: taurus-qt