idenitity of an editor?

51 views
Skip to first unread message

fah...@gmail.com

unread,
Aug 10, 2016, 2:12:11 AM8/10/16
to Light Table Discussion
Does an editor have a unique identity for the length of its life? I looked in the source for lt.objs.editor but didn't see something like a unique identity.

Example: a plugin has one bit of state, an atom which is a map of editor id to some value that it maintains. The purpose is to save some result from the last time the plugin was asked to deal with a particular editor (instead of starting from scratch every time) .... Or if this is a bad idea, can you tell me more?


fah...@gmail.com

unread,
Aug 10, 2016, 12:48:55 PM8/10/16
to Light Table Discussion
(I can see how it might be a bad idea since the editor's attributes (like its value) could have changed in the meantime and the state that the plugin saved for it could become incorrect unless draconian / brittle / ugly measures are taken -- but I'm still curious about whether an editor can be uniquely identified)

Kenny Evitt

unread,
Aug 10, 2016, 11:19:29 PM8/10/16
to Light Table Discussion
The 'lt.objs.editor' namespace defines an object *template* for editor objects. Look at 'lt.objs.editor.pool' for code that creates editor objects.
Reply all
Reply to author
Forward
0 new messages