owickstrom / gi-gtk-declarative

Declarative GTK+ programming in Haskell
https://owickstrom.github.io/gi-gtk-declarative/
284 stars 32 forks source link

Remove afterCreated attribute #68

Closed owickstrom closed 4 years ago

owickstrom commented 4 years ago

This removes the afterCreated attribute. If you have need for interacting with the underlying GTK widget in a special way, implement a CustomWidget.

Closes #13

balsoft commented 4 years ago

Can you provide an example of such a custom widget?

What I actually want to do is focus a widget after it has been created: https://github.com/balsoft/lambda-launcher/blob/4d1ec13a9fed472aa9fb67b826a1f816809ee7e4/src/LambdaLauncher/Main.hs#L107 . Maybe there is a better way to do this?

owickstrom commented 4 years ago

@balsoft https://github.com/owickstrom/gi-gtk-declarative/blob/master/examples/CustomWidget.hs#L52 should be a decent start. 👍

balsoft commented 4 years ago

Thanks!