{"action":"created","issue":{"url":"https://api.github.com/repos/lxn/walk/issues/186","repository_url":"https://api.github.com/repos/lxn/walk","labels_url":"https://api.github.com/repos/lxn/walk/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/lxn/walk/issues/186/comments","events_url":"https://api.github.com/repos/lxn/walk/issues/186/events","html_url":"https://github.com/lxn/walk/issues/186","id":136635261,"number":186,"title":"Need help with tableView","user":{"login":"Zippelin","id":11209504,"avatar_url":"https://avatars.githubusercontent.com/u/11209504?v=3","gravatar_id":"","url":"https://api.github.com/users/Zippelin","html_url":"https://github.com/Zippelin","followers_url":"https://api.github.com/users/Zippelin/followers","following_url":"https://api.github.com/users/Zippelin/following{/other_user}","gists_url":"https://api.github.com/users/Zippelin/gists{/gist_id}","starred_url":"https://api.github.com/users/Zippelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zippelin/subscriptions","organizations_url":"https://api.github.com/users/Zippelin/orgs","repos_url":"https://api.github.com/users/Zippelin/repos","events_url":"https://api.github.com/users/Zippelin/events{/privacy}","received_events_url":"https://api.github.com/users/Zippelin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-26T09:02:23Z","updated_at":"2016-03-18T07:41:03Z","closed_at":null,"body":"Good day, Iam try to figure out how TableView work and cant understand how to fill it with data.\r\nI have test code to learn it, but when i compile nothing happens (even window dont open)\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"github.com/lxn/walk\"\r\n\t. \"github.com/lxn/walk/declarative\"\r\n)\r\n\r\ntype Foo struct {\r\n\tIndex int\r\n\tData  string\r\n}\r\n\r\ntype FooModel struct {\r\n\twalk.TableModelBase\r\n\titems []*Foo\r\n}\r\n\r\nfunc NewFooModel() *FooModel {\r\n\tm := new(FooModel)\r\n\tm.aa()\r\n\treturn m\r\n}\r\n\r\nfunc main() {\r\n\tmodel := NewFooModel()\r\n\tvar tv *walk.TableView\r\n\tvar mw *walk.MainWindow\r\n\r\n\tMainWindow{\r\n\t\tTitle:    \"aa\",\r\n\t\tAssignTo: &mw,\r\n\t\tSize:     Size{800, 800},\r\n\t\tLayout:   VBox{},\r\n\t\tChildren: []Widget{\r\n\t\t\tPushButton{\r\n\t\t\t\tText:      \"Reset Rows\",\r\n\t\t\t\tOnClicked: model.aa,\r\n\t\t\t},\r\n\t\t\tTableView{\r\n\t\t\t\tAssignTo: &tv,\r\n\t\t\t\tColumns: []TableViewColumn{\r\n\t\t\t\t\t{Title: \"Index\"},\r\n\t\t\t\t\t{Title: \"Data\"},\r\n\t\t\t\t},\r\n\t\t\t\tModel: model,\r\n\t\t\t\tOnCurrentIndexChanged: func() {\r\n\t\t\t\t\tfmt.Println(\"HELLO\")\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t},\r\n\t}.Run()\r\n\r\n}\r\n\r\nfunc (m *FooModel) aa() {\r\n\tm.items = make([]*Foo, 10)\r\n\tfor i := range m.items {\r\n\t\tm.items[i] = &Foo{\r\n\t\t\tIndex: i,\r\n\t\t\tData:  \"aa\",\r\n\t\t}\r\n\t}\r\n\tm.PublishRowsReset()\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/lxn/walk/issues/comments/198241128","html_url":"https://github.com/lxn/walk/issues/186#issuecomment-198241128","issue_url":"https://api.github.com/repos/lxn/walk/issues/186","id":198241128,"user":{"login":"lxn","id":352638,"avatar_url":"https://avatars.githubusercontent.com/u/352638?v=3","gravatar_id":"","url":"https://api.github.com/users/lxn","html_url":"https://github.com/lxn","followers_url":"https://api.github.com/users/lxn/followers","following_url":"https://api.github.com/users/lxn/following{/other_user}","gists_url":"https://api.github.com/users/lxn/gists{/gist_id}","starred_url":"https://api.github.com/users/lxn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxn/subscriptions","organizations_url":"https://api.github.com/users/lxn/orgs","repos_url":"https://api.github.com/users/lxn/repos","events_url":"https://api.github.com/users/lxn/events{/privacy}","received_events_url":"https://api.github.com/users/lxn/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T07:41:03Z","updated_at":"2016-03-18T07:41:03Z","body":"It would be nice if `TreeView` could do this, but you assumed right, it can't."}}