Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declarative TreeViews #185

Open
steven-joruk opened this issue Oct 18, 2019 · 1 comment
Open

Declarative TreeViews #185

steven-joruk opened this issue Oct 18, 2019 · 1 comment

Comments

@steven-joruk
Copy link

steven-joruk commented Oct 18, 2019

Hello! I'm finding TreeViews a bit unintuitive to use with #[widget].

  1. In issue connect! with TreeSelection #50 you gave some example code for connecting a child's signals which sounds great, but the branch was deleted. Is this still a goal, or is it already possible? I couldn't see any examples or obvious implementation.

  2. In issue Question: connect CellRendererText callback in the init_view? #181 and in the async example the solution for using connect! on a TreeSelection is to store a clone of the relm object in the model to use later on, but it doesn't feel nice - maybe init_view could be given a &Relm<T> or the relm's stream?

  3. Is setting up CellRenderers and TreeViewColumns declaratively a future goal or is it a bad approach?

Thanks :).

@antoyo
Copy link
Owner

antoyo commented Oct 19, 2019

Hi.

  1. The example was moved here.
  2. I think init_view() used to take a Relm as a parameter, but I removed it to make the function signatures simpler. Now that you talk about it, maybe I could change the code generation so that connect!() could take self as a parameter.
  3. Yes it is. That would require creating custom relm widgets for these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants