Skip to content

Commit

Permalink
DOC: Minor warning pertinent to migrating settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Sep 20, 2017
1 parent 61fcbad commit ffeb373
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/development/source/tutorial-settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ Imagine opening a complex workflow you have designed a year ago with the
new version of Orange and finding out that all the settings are back to
default. Not fun!

.. warning::

If you change the format of an existing setting in a backwards-incompatible
way, you will also want to *change the name* of that setting. Otherwise,
older versions of Orange won't be able to load workflows with the new
setting format.

There are two helper functions you can use.
:obj:`Orange.widget.settings.rename_settings(settings, old_name, new_name)`
does the obvious operation on `settings`, which can be either a dictionary
Expand All @@ -304,7 +311,7 @@ or a context, thus it can be called from `migrate_settings` or

Another common operation may be upgrading your widget from storing variable
names (as `str`) to storing variables (instances of classes derived from
`Variable`). In a typical scenario, this happenswhen combo boxes are upgraded to
`Variable`). In a typical scenario, this happens when combo boxes are upgraded to
using models. Function
:obj:`Orange.widget.settings.migrate_str_to_variable(settings, names=None)`
makes the necessary changes to the settings listed in `names`. `names` can be
Expand Down

0 comments on commit ffeb373

Please sign in to comment.