{"action":"created","issue":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/1646","repository_url":"https://api.github.com/repos/Hammerspoon/hammerspoon","labels_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/1646/labels{/name}","comments_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/1646/comments","events_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/1646/events","html_url":"https://github.com/Hammerspoon/hammerspoon/pull/1646","id":287956429,"number":1646,"title":"[WIP] Modernise hs.application, hs.window and hs.uielement","user":{"login":"cmsj","id":353427,"avatar_url":"https://avatars0.githubusercontent.com/u/353427?v=4","gravatar_id":"","url":"https://api.github.com/users/cmsj","html_url":"https://github.com/cmsj","followers_url":"https://api.github.com/users/cmsj/followers","following_url":"https://api.github.com/users/cmsj/following{/other_user}","gists_url":"https://api.github.com/users/cmsj/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsj/subscriptions","organizations_url":"https://api.github.com/users/cmsj/orgs","repos_url":"https://api.github.com/users/cmsj/repos","events_url":"https://api.github.com/users/cmsj/events{/privacy}","received_events_url":"https://api.github.com/users/cmsj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-01-11T23:11:05Z","updated_at":"2018-02-01T09:52:33Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/pulls/1646","html_url":"https://github.com/Hammerspoon/hammerspoon/pull/1646","diff_url":"https://github.com/Hammerspoon/hammerspoon/pull/1646.diff","patch_url":"https://github.com/Hammerspoon/hammerspoon/pull/1646.patch"},"body":"This is definitely not ready yet, it doesn't build and I've only really done hs.application so far, and it's not tested.\r\n\r\nCritiques welcome though :)"},"comment":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/comments/362214783","html_url":"https://github.com/Hammerspoon/hammerspoon/pull/1646#issuecomment-362214783","issue_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/1646","id":362214783,"user":{"login":"asmagill","id":8139480,"avatar_url":"https://avatars0.githubusercontent.com/u/8139480?v=4","gravatar_id":"","url":"https://api.github.com/users/asmagill","html_url":"https://github.com/asmagill","followers_url":"https://api.github.com/users/asmagill/followers","following_url":"https://api.github.com/users/asmagill/following{/other_user}","gists_url":"https://api.github.com/users/asmagill/gists{/gist_id}","starred_url":"https://api.github.com/users/asmagill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmagill/subscriptions","organizations_url":"https://api.github.com/users/asmagill/orgs","repos_url":"https://api.github.com/users/asmagill/repos","events_url":"https://api.github.com/users/asmagill/events{/privacy}","received_events_url":"https://api.github.com/users/asmagill/received_events","type":"User","site_admin":false},"created_at":"2018-02-01T09:52:33Z","updated_at":"2018-02-01T09:52:33Z","author_association":"MEMBER","body":"Running from within XCode, I get \r\n\r\n~~~\r\n2018-02-01 03:41:38: ********\r\n03:41:38 ERROR:   LuaSkin: hs.timer callback error: ...oon.app/Contents/Resources/extensions/hs/window/init.lua:515: ERROR: incorrect type 'no value' for argument 2 (expected boolean)\r\nstack traceback:\r\n\t[C]: in method '_bringtofront'\r\n\t...oon.app/Contents/Resources/extensions/hs/window/init.lua:515: in method 'focus'\r\n\t/Users/amagill/.config/hammerspoon/init.lua:122: in function </Users/amagill/.config/hammerspoon/init.lua:120>\r\n2018-02-01 03:41:38: ********\r\n~~~\r\n\r\nThe timer is defined as:\r\n~~~lua\r\ntimer.doAfter(1, function()\r\n    if fmW then\r\n        fmW:focus()\r\n    else\r\n        local finder = application(\"Finder\")\r\n        if finder then\r\n            alert(\"Activating Finder\")\r\n            finder:activate()\r\n        end\r\n    end\r\nend)\r\n~~~\r\nwhere `fmW` is captured at the beginning of my init.lua as the front-most-window; I've verified that it is defined (not nil) at this point.\r\n\r\nDigging into the source for `hs.window` and `hs.application`, you either need to add a boolean flag to line 515 of `hs.window`'s init.lua or give `hs.application`'s `_bringtofront` a default and allow the boolean to be optional. Since it appears to be an internally used function only, I leave the choice to you."}}
{"actor":{"display_login":"asmagill"}}