{"action":"created","issue":{"url":"https://api.github.com/repos/larskanis/fxruby/issues/18","labels_url":"https://api.github.com/repos/larskanis/fxruby/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/larskanis/fxruby/issues/18/comments","events_url":"https://api.github.com/repos/larskanis/fxruby/issues/18/events","html_url":"https://github.com/larskanis/fxruby/issues/18","id":53977335,"number":18,"title":"Cannot overload table widget items","user":{"login":"JosephAustin","id":1711387,"avatar_url":"https://avatars.githubusercontent.com/u/1711387?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephAustin","html_url":"https://github.com/JosephAustin","followers_url":"https://api.github.com/users/JosephAustin/followers","following_url":"https://api.github.com/users/JosephAustin/following{/other_user}","gists_url":"https://api.github.com/users/JosephAustin/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephAustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephAustin/subscriptions","organizations_url":"https://api.github.com/users/JosephAustin/orgs","repos_url":"https://api.github.com/users/JosephAustin/repos","events_url":"https://api.github.com/users/JosephAustin/events{/privacy}","received_events_url":"https://api.github.com/users/JosephAustin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-11T00:51:31Z","updated_at":"2015-01-12T00:35:54Z","closed_at":null,"body":"The draw() functions in the FXTableItem class are designed for overloading but ignore requests. All draw commands to the DC do not have any influence over what is output. Strangely, a direct copy of the rdoc for drawBackground doesn't work, yet if it calls 'super', it does:\r\n\r\n# Fail\r\ndef drawBackground(table, dc, x, y, w, h)\r\n  hg = table.horizontalGridShown? ? 1 : 0\r\n  vg = table.verticalGridShown? ? 1 : 0\r\n  dc.fillRectangle(x + vg, y + hg, w - vg, h - hg)\r\nend\r\n\r\n# Pass\r\ndef drawBackground(table, dc, x, y, w, h)\r\n  super\r\nend\r\n\r\nEvidence that this is unexpected behavior: http://foxgui-users.narkive.com/pAY1E2KE/how-to-embed-a-checkbox-into-the-fxtable\r\n"},"comment":{"url":"https://api.github.com/repos/larskanis/fxruby/issues/comments/69519982","html_url":"https://github.com/larskanis/fxruby/issues/18#issuecomment-69519982","issue_url":"https://api.github.com/repos/larskanis/fxruby/issues/18","id":69519982,"user":{"login":"JosephAustin","id":1711387,"avatar_url":"https://avatars.githubusercontent.com/u/1711387?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephAustin","html_url":"https://github.com/JosephAustin","followers_url":"https://api.github.com/users/JosephAustin/followers","following_url":"https://api.github.com/users/JosephAustin/following{/other_user}","gists_url":"https://api.github.com/users/JosephAustin/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephAustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephAustin/subscriptions","organizations_url":"https://api.github.com/users/JosephAustin/orgs","repos_url":"https://api.github.com/users/JosephAustin/repos","events_url":"https://api.github.com/users/JosephAustin/events{/privacy}","received_events_url":"https://api.github.com/users/JosephAustin/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T00:35:54Z","updated_at":"2015-01-12T00:35:54Z","body":"Incidently 'dc' in drawBackground is an FXDC, not an FXDCWindow when it comes into the function. It probably needs to be cast or something in the FXRuby core. Alternately, we could always force this behavior with custom overloads of the draw function."}}