How to update the prefs outline in River2

I made a design mistake a long time ago in how Prefs outlines are included in Tools, and to make up for the mistake I added a feature, that sometimes I forget how to use. By leaving this note here, for the future, when I look it up in a search engine, I’ll be reminded how to do it. So unless you’re a maintainer of River2 or another OPML Editor or Frontier tool, you can skip this post.

The design mistake was naming the top-level table #installer. It should have been named river2Installer. That way the prefs outline would have a unique address and could be updated using the normal RSS-based updating mechanism. But I didn’t do that, so you have to do something special to update the various pieces of the #installer table.

Luckily this usually isn’t a problem because the code in the #installer table is meant to run once, when the tool installs, and the installer code in system.verbs.builtins.opmlEditor has no trouble finding it. The one exception is the prefs outline, which probably should not have been in this table.

So I added the option of indirection. If ["#installer"].prefs is a string (it’s important that it not be an address) then it’s interpreted as an address. So I have it pointing to river2suite.data.prefsOutline. That part can be updated using the normal RSS-based updating mechanism.

So that’s how you update the prefs outline, simply by updating river2suite.data.prefsOutline.

Voila!

Respond to this post