Click here to show or hide the menubar.

Toward invariant names


Suppose you create a new blogpost node, and save it, push the link to Twitter, and then realize the title is wrong. So you change the title, and now you broke all the links to that post.

We solved this problem in Scripting2 by having the name of the story be invariant. You can change the title as much as you want, but the name of the page doesn't change.

So I'm moving toward being able to do this by adding a bit to the opCursorMovedCallback in the opmlEditor table. If you move the cursor onto a headline that has a type attribute but no name attribute, and if the headline has non-whitespace characters in it, we create a name attribute for it.

This will eventually be picked up by the worldoutline app. But at least it'll be there for new stuff.

Parts

opmlEditor.setNameAttribute

opmlEditor.opCursorMovedCallback

opmlEditor.menuCommands.outlinerSetTypeTo


Posted on Monday, May 28, 2012 at 12:03 PM by Dave Winer.