On Wed, 22 Mar 2017 10:37:15 -0500 "Edward K. Ream" <[email protected]> wrote:
> > I think Leo will become much more powerful / flexible when it has > > multiple node editor components that are free to act on different > > parts of the tree. > > Yes. I was just thinking that a Publish/Subscribe pattern for > notifications might be good. Yep, that's the pattern LEP's using. I think it's listening to bodykey2, which works apart from backspace / delete not generating a signal (trivial). And in the opposite direction, the original body pane sees changes to c.p.b immediately, I should work out the mechanism behind that. I was thinking about using PyQt's signal/slot architecture, but probably best not, we don't want the presence of PyQt to be required to run Leo, this might be a gateway to web based front ends etc. as well. Currently LEPs communicate between themselves based on a master list, but it would be better if that communication was Publish/Subscribe as well. I think the way forward on this infrastructure's reasonably clear, the challenge is that until "LeoQTextEditor" widget is available in the LEP framework, the actual result isn't going to be super useful. But perhaps a first question is: Is Leo's hooks mechanism (with some new hooks) sufficient for the task, or do we need something new, a lightweight version of Qt's signal/slot system.? I'd argue for trying the existing hook route first. We probably need a "body-text-changed" and "head-text-changed" hook, being better abstractions than the current input oriented hooks. I'd argue we can get away without any kind of locking, seeing the changes are almost always going to come from the focused widget, and at a keystroke by keystroke frequency. Situations where some component allows unsubmitted changes to accumulate can be considered later. 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.
