{"action":"created","issue":{"url":"https://api.github.com/repos/gtk-rs/gtk/issues/192","labels_url":"https://api.github.com/repos/gtk-rs/gtk/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/gtk-rs/gtk/issues/192/comments","events_url":"https://api.github.com/repos/gtk-rs/gtk/issues/192/events","html_url":"https://github.com/gtk-rs/gtk/issues/192","id":118552243,"number":192,"title":"Issue with Removing/Adding Widgets","user":{"login":"mmstick","id":4143535,"avatar_url":"https://avatars.githubusercontent.com/u/4143535?v=3","gravatar_id":"","url":"https://api.github.com/users/mmstick","html_url":"https://github.com/mmstick","followers_url":"https://api.github.com/users/mmstick/followers","following_url":"https://api.github.com/users/mmstick/following{/other_user}","gists_url":"https://api.github.com/users/mmstick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmstick/subscriptions","organizations_url":"https://api.github.com/users/mmstick/orgs","repos_url":"https://api.github.com/users/mmstick/repos","events_url":"https://api.github.com/users/mmstick/events{/privacy}","received_events_url":"https://api.github.com/users/mmstick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-24T07:48:38Z","updated_at":"2015-11-24T20:45:18Z","closed_at":null,"body":"I've made a program that generates a list of widgets contained within a `ScrolledWindow` and I want users to be able to refresh the list based on the entry inside of a `SearchEntry`. My only problem is that I've had no success in figuring out how to remove the current `ScrolledWindow` and replace it with a newly-generated `ScrolledWindow` after pressing enter on the `SearchEntry`. I can at least get the text from the `SearchEntry` and do things with that text, like creating a new list with that text, but replacing the pre-existing `ScrolledWindow` is my problem.\r\n\r\nI thought about simply overwriting the current list's variable with a newly-created list, but I'm unable to do so inside the `connect_key_press_event` closure because it's a `Fn` closure instead of `FnMut`, hence modifying external variables outside of the closure while inside the closure is disallowed.\r\n\r\nI thought about removing the original `ScrolledWindow` and just slapping on a newly-generated one inside the closure, but then I have no idea how I'd be able to remove that newly-created `ScrolledWindow` the next time the closure is called since there will no longer be a visible reference to it that I can call.\r\n\r\nMy other issue is that I apparently cannot get newly-created `ScrolledWindow`s to appear. Only the first `ScrolledWindow` I create works, but subsequent `ScrolledWindow`s are invisible -- taking up space but not showing anything, even if I manually set `set_visible(true)` and use `pack_start(&scrolled, true, true, 0)`."},"comment":{"url":"https://api.github.com/repos/gtk-rs/gtk/issues/comments/159399989","html_url":"https://github.com/gtk-rs/gtk/issues/192#issuecomment-159399989","issue_url":"https://api.github.com/repos/gtk-rs/gtk/issues/192","id":159399989,"user":{"login":"mmstick","id":4143535,"avatar_url":"https://avatars.githubusercontent.com/u/4143535?v=3","gravatar_id":"","url":"https://api.github.com/users/mmstick","html_url":"https://github.com/mmstick","followers_url":"https://api.github.com/users/mmstick/followers","following_url":"https://api.github.com/users/mmstick/following{/other_user}","gists_url":"https://api.github.com/users/mmstick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmstick/subscriptions","organizations_url":"https://api.github.com/users/mmstick/orgs","repos_url":"https://api.github.com/users/mmstick/repos","events_url":"https://api.github.com/users/mmstick/events{/privacy}","received_events_url":"https://api.github.com/users/mmstick/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T20:45:18Z","updated_at":"2015-11-24T20:45:18Z","body":"You can if you git the full source though."}}