{"action":"created","issue":{"url":"https://api.github.com/repos/Exopy/exopy/issues/149","repository_url":"https://api.github.com/repos/Exopy/exopy","labels_url":"https://api.github.com/repos/Exopy/exopy/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/Exopy/exopy/issues/149/comments","events_url":"https://api.github.com/repos/Exopy/exopy/issues/149/events","html_url":"https://github.com/Exopy/exopy/issues/149","id":328738868,"node_id":"MDU6SXNzdWUzMjg3Mzg4Njg=","number":149,"title":"Profile edition window: setting default to None but looks selected","user":{"login":"rassouly","id":4159159,"node_id":"MDQ6VXNlcjQxNTkxNTk=","avatar_url":"https://avatars1.githubusercontent.com/u/4159159?v=4","gravatar_id":"","url":"https://api.github.com/users/rassouly","html_url":"https://github.com/rassouly","followers_url":"https://api.github.com/users/rassouly/followers","following_url":"https://api.github.com/users/rassouly/following{/other_user}","gists_url":"https://api.github.com/users/rassouly/gists{/gist_id}","starred_url":"https://api.github.com/users/rassouly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rassouly/subscriptions","organizations_url":"https://api.github.com/users/rassouly/orgs","repos_url":"https://api.github.com/users/rassouly/repos","events_url":"https://api.github.com/users/rassouly/events{/privacy}","received_events_url":"https://api.github.com/users/rassouly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-02T12:08:08Z","updated_at":"2018-06-04T12:23:41Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When adding some instruments, the user is required to set up some settings in the profile. When validating the connection to this instrument, the user is presented with 2 drop down menus (ObjectCombos): one for the connection and one for the settings. The issue comes from ``selected >> dial.settings``. On some machines, ``selected`` defaults to ``None`` but an item looks like it's selected for the user.\r\nReplacing the ``>>`` operator with an ``:=`` shows that ``settings`` defaults to ``None`` (a blank option is added to the drop down).\r\n\r\nI think that the issue comes from the following code in Enaml\r\n```\r\ndef _default_selected(self):\r\n        items = self.items\r\n        if len(items) > 0:\r\n            return items[0]\r\n```\r\nAt the time when ``selected >> dial.settings`` is called, ``items`` has not been set yet and hence the default value of ``selected`` is None.\r\n\r\nThis issue could arise for other instances of ``ObjectCombo``.\r\n\r\nIs there a better fix than replacing ``<<`` by ``:=``? "},"comment":{"url":"https://api.github.com/repos/Exopy/exopy/issues/comments/394335989","html_url":"https://github.com/Exopy/exopy/issues/149#issuecomment-394335989","issue_url":"https://api.github.com/repos/Exopy/exopy/issues/149","id":394335989,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDMzNTk4OQ==","user":{"login":"MatthieuDartiailh","id":4481740,"node_id":"MDQ6VXNlcjQ0ODE3NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/4481740?v=4","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T12:23:41Z","updated_at":"2018-06-04T12:23:41Z","author_association":"MEMBER","body":"The issue is not in enaml but rather in the very sloppy code I wrote. The proper way to do that is to declare the `connection` and `settings` as aliases of the `selected` member of the associated ObjectCombo. Could you add this to #150 ?"}}
{"actor":{"display_login":"MatthieuDartiailh"}}