{"action":"created","issue":{"url":"https://api.github.com/repos/NetLogo/NetLogo/issues/682","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/682/comments","events_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/682/events","html_url":"https://github.com/NetLogo/NetLogo/issues/682","id":53633969,"number":682,"title":"Carefully broken","user":{"login":"DenoBeno","id":2961790,"avatar_url":"https://avatars.githubusercontent.com/u/2961790?v=3","gravatar_id":"","url":"https://api.github.com/users/DenoBeno","html_url":"https://github.com/DenoBeno","followers_url":"https://api.github.com/users/DenoBeno/followers","following_url":"https://api.github.com/users/DenoBeno/following{/other_user}","gists_url":"https://api.github.com/users/DenoBeno/gists{/gist_id}","starred_url":"https://api.github.com/users/DenoBeno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DenoBeno/subscriptions","organizations_url":"https://api.github.com/users/DenoBeno/orgs","repos_url":"https://api.github.com/users/DenoBeno/repos","events_url":"https://api.github.com/users/DenoBeno/events{/privacy}","received_events_url":"https://api.github.com/users/DenoBeno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-07T13:52:02Z","updated_at":"2015-01-07T14:19:15Z","closed_at":null,"body":"I tried to use the entry fields to set up the model. Since the entry field can be empty, I tried to use \"carefully\" to catch such cases and set default value if nothing is provided. Something like:\r\n\r\nto setup-turtles\r\n  Carefully [  Create-turtles N ] [ \r\n       Set N 100 \r\n      Create-turtles N\r\n    ]\r\nend\r\n\r\nI tested this in a simple model which has an entry field called N. On the first try (N undefined), I get this runtime error: \r\n\r\nASK expected input to be an agent or agentset but got NOBODY instead.\r\nerror while observer running ASK\r\n  called by procedure SETUP-TURTLES\r\n  called by procedure SETUP\r\n  called by Button 'setup'\r\n \r\nso basically the program comes to runtime-exception checking part and then fails with runtime exception. Nice. :-)\r\n\r\nAnd it gets better: if I run the model with some number and then delete the number, the error changes into \"Invalid input for a number: expected a number\" exception instead. Which is probably the runtime exception check on the input form. \r\n\r\nhope this helps"},"comment":{"url":"https://api.github.com/repos/NetLogo/NetLogo/issues/comments/69027122","html_url":"https://github.com/NetLogo/NetLogo/issues/682#issuecomment-69027122","issue_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/682","id":69027122,"user":{"login":"digitaldust","id":3994257,"avatar_url":"https://avatars.githubusercontent.com/u/3994257?v=3","gravatar_id":"","url":"https://api.github.com/users/digitaldust","html_url":"https://github.com/digitaldust","followers_url":"https://api.github.com/users/digitaldust/followers","following_url":"https://api.github.com/users/digitaldust/following{/other_user}","gists_url":"https://api.github.com/users/digitaldust/gists{/gist_id}","starred_url":"https://api.github.com/users/digitaldust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitaldust/subscriptions","organizations_url":"https://api.github.com/users/digitaldust/orgs","repos_url":"https://api.github.com/users/digitaldust/repos","events_url":"https://api.github.com/users/digitaldust/events{/privacy}","received_events_url":"https://api.github.com/users/digitaldust/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T14:19:15Z","updated_at":"2015-01-07T14:19:15Z","body":"I tried too, but the only thing I can reproduce is that if you delete the\r\nnumber from the input and then try to call setup-turtles, then you have the\r\nexpected \"Invalid input for a number: expected a number\" exception when you\r\nleave the input widget.\r\n\r\n2015-01-07 15:09 GMT+01:00 Seth Tisue <notifications@github.com>:\r\n\r\n> I'm unable to reproduce the problem on my own computer. I don't think\r\n> you've provided all of the relevant code? The error says \"ASK expected\r\n> input to be an agent or agentset\", but ask doesn't appear anywhere in the\r\n> code you've provided.\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/NetLogo/NetLogo/issues/682#issuecomment-69025902>.\r\n>\r\n\r\n\r\n\r\n-- \r\n-----------------------------------------------------------------\r\n\r\nSimone Gabbriellini, PhD\r\n\r\nPost-doctoral Researcher\r\nANR founded research project \"DIFFCERAM\"\r\nGEMASS, CNRS & Paris-Sorbonne.\r\n\r\nmobile: +39 340 39 75 626\r\nemail: simone.gabbriellini@cnrs.fr"}}