On Thu, 23 Mar 2017 03:31:05 -0500
"Edward K. Ream" <[email protected]> wrote:

> ​After further thought, I see that the problem with the Pub/Sub​
> 
> ​pattern is that it isn't a good fit for multiple body panes.
> Indeed, only one body pane, the presently selected pane, should
> "respond" to a change in c.p.
> 
> So there can only be one "subscriber" at a time. This makes the
> "subscriber list" not so useful ;-) Sure, there are workarounds, but
> the pattern is far from a magic bullet.

The LEP model, which seems to be working fine, is that an editor
component (let's stop calling them body panes ;-) may or may not be
tracking the node selected in the tree.  Whether it's selected or not.
Partly for LEP this is because it's an edit and / or view component,
but even if you're only talking about editor components, you could have
multiple editors tracking the node selected in the tree, aka c.p.
Maybe one is a live code editor component that displays the node and
its output, and the other's a multi-body editor which displays a series
of body nodes centered on c.p.

I don't see any shortcomings in the pub/sub pattern, and I think
anything more tightly coupled would be harder to implement.  It's
possible that Leo's current hooks might be insufficient in that you can
subscribe to signals from an instance of something, only to the type of
signal in general, but I'm not sure about that yet.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to