On Fri, Mar 25, 2016 at 4:14 PM, 'Terry Brown' via leo-editor <
[email protected]> wrote:

>
> > I'll be retiring the viewrendered2 plugin asap, folding whatever
> > features it might still uniquely provide into vr.
>
> That's great - just a note that the viewrendered pane shouldn't be a
> singleton... you could have a particular instance bound to
> `hide-viewrendered` etc. etc., but you be able to have more than one
> viewrendered pane viewing different things at different times.


​I see a ViewRenderedProvider.​

​Ah, I see what you mean.  The ns_provides method uses a cached controller
if it exists.  It looks like the code you want is commented out:

    return ViewRenderedController(self.c)

I'll make the change now.
​

> This
> functionality has existed to various degrees at various times, but
> might be a bit fragile.  For one thing it implies some vr panes track
> the current tree position and some don't.
>
> Let me know if I can help with any of the free_layout related aspects.
>

​Thanks.  I'll keep this in mind.​

Actually, I was thinking that the various "Provider" classes really only
provide arguments to splitter.register_provider. And at last I see the call
to register_provider for the ViewRenderedController class: it's in the ctor
for the ViewRenderedProvider class.

I just don't see the need for the Provider classes. Why not just provide
the info as arguments to register_provider?  The call to register_provider
will always happen in a context where the data are easily available, so
having a separate "encapsulation" class seems like overkill.

Furthermore, why not have the "id" be WhateverProvider.__class__.__name__?
This works provided that each Provider class actually has a distinct name.

What do you think?  Would it be somehow inconvenient to dispense with the
Provider classes?

Edward

-- 
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