{"action":"created","issue":{"url":"https://api.github.com/repos/edvin/tornadofx/issues/163","repository_url":"https://api.github.com/repos/edvin/tornadofx","labels_url":"https://api.github.com/repos/edvin/tornadofx/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/edvin/tornadofx/issues/163/comments","events_url":"https://api.github.com/repos/edvin/tornadofx/issues/163/events","html_url":"https://github.com/edvin/tornadofx/issues/163","id":172778330,"number":163,"title":"Improving TableView Column Expressions","user":{"login":"thomasnield","id":7420801,"avatar_url":"https://avatars.githubusercontent.com/u/7420801?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasnield","html_url":"https://github.com/thomasnield","followers_url":"https://api.github.com/users/thomasnield/followers","following_url":"https://api.github.com/users/thomasnield/following{/other_user}","gists_url":"https://api.github.com/users/thomasnield/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasnield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasnield/subscriptions","organizations_url":"https://api.github.com/users/thomasnield/orgs","repos_url":"https://api.github.com/users/thomasnield/repos","events_url":"https://api.github.com/users/thomasnield/events{/privacy}","received_events_url":"https://api.github.com/users/thomasnield/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2016-08-23T18:54:29Z","updated_at":"2016-10-08T14:23:55Z","closed_at":"2016-09-03T17:50:05Z","body":"I understand it is usually best to create an explicit domain object for a `TableView`, so you can use the nice reflection syntax to map a property to a column value.\r\n\r\n```kotlin\r\ncolumn(\"REVENUE\",ReportItem::revenue)\r\n```\r\n\r\nBut sometimes it would be nice to quickly derive additional fields without having to create an explicit property for it. This is possible currently, but the syntax is a bit messy.\r\n\r\n```kotlin\r\ncolumn<ReportItem,BigDecimal> { \r\n    ReadOnlyObjectWrapper(it.value.revenueAmounts.asSequence().fold(BigDecimal.ZERO) { x, y -> x + y })\r\n}\r\n```\r\n\r\nWould it be worthwhile trying to clean up this usage? And get rid of the generics, navigating to the `value`, as well as the wrapper? \r\n\r\n\r\n```kotlin\r\ncolumn { \r\n    revenueAmounts.asSequence().fold(BigDecimal.ZERO) { x, y -> x + y }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/edvin/tornadofx/issues/comments/252427229","html_url":"https://github.com/edvin/tornadofx/issues/163#issuecomment-252427229","issue_url":"https://api.github.com/repos/edvin/tornadofx/issues/163","id":252427229,"user":{"login":"edvin","id":977035,"avatar_url":"https://avatars.githubusercontent.com/u/977035?v=3","gravatar_id":"","url":"https://api.github.com/users/edvin","html_url":"https://github.com/edvin","followers_url":"https://api.github.com/users/edvin/followers","following_url":"https://api.github.com/users/edvin/following{/other_user}","gists_url":"https://api.github.com/users/edvin/gists{/gist_id}","starred_url":"https://api.github.com/users/edvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edvin/subscriptions","organizations_url":"https://api.github.com/users/edvin/orgs","repos_url":"https://api.github.com/users/edvin/repos","events_url":"https://api.github.com/users/edvin/events{/privacy}","received_events_url":"https://api.github.com/users/edvin/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T14:23:55Z","updated_at":"2016-10-08T14:23:55Z","body":"Great :)"}}
{"actor":{"display_login":"edvin"}}