{"action":"created","issue":{"url":"https://api.github.com/repos/hridesh/panini/issues/25","labels_url":"https://api.github.com/repos/hridesh/panini/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/hridesh/panini/issues/25/comments","events_url":"https://api.github.com/repos/hridesh/panini/issues/25/events","html_url":"https://github.com/hridesh/panini/pull/25","id":86635799,"number":25,"title":"Child capsules","user":{"login":"ddmills","id":4615125,"avatar_url":"https://avatars.githubusercontent.com/u/4615125?v=3","gravatar_id":"","url":"https://api.github.com/users/ddmills","html_url":"https://github.com/ddmills","followers_url":"https://api.github.com/users/ddmills/followers","following_url":"https://api.github.com/users/ddmills/following{/other_user}","gists_url":"https://api.github.com/users/ddmills/gists{/gist_id}","starred_url":"https://api.github.com/users/ddmills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddmills/subscriptions","organizations_url":"https://api.github.com/users/ddmills/orgs","repos_url":"https://api.github.com/users/ddmills/repos","events_url":"https://api.github.com/users/ddmills/events{/privacy}","received_events_url":"https://api.github.com/users/ddmills/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"dwtj","id":2457848,"avatar_url":"https://avatars.githubusercontent.com/u/2457848?v=3","gravatar_id":"","url":"https://api.github.com/users/dwtj","html_url":"https://github.com/dwtj","followers_url":"https://api.github.com/users/dwtj/followers","following_url":"https://api.github.com/users/dwtj/following{/other_user}","gists_url":"https://api.github.com/users/dwtj/gists{/gist_id}","starred_url":"https://api.github.com/users/dwtj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwtj/subscriptions","organizations_url":"https://api.github.com/users/dwtj/orgs","repos_url":"https://api.github.com/users/dwtj/repos","events_url":"https://api.github.com/users/dwtj/events{/privacy}","received_events_url":"https://api.github.com/users/dwtj/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-06-09T15:21:36Z","updated_at":"2015-06-11T18:58:37Z","closed_at":"2015-06-11T18:25:11Z","pull_request":{"url":"https://api.github.com/repos/hridesh/panini/pulls/25","html_url":"https://github.com/hridesh/panini/pull/25","diff_url":"https://github.com/hridesh/panini/pull/25.diff","patch_url":"https://github.com/hridesh/panini/pull/25.patch"},"body":"This branch adds support for arrays of \"child\" capsules. (Child as in, a member of another capsule)\r\n\r\nWe declare an array of child capsules as such (from org.paninij.examples.echo):\r\n```java\r\n@Child Worker[] workers = new Worker[10];\r\n```\r\n\r\nAnd in the `design()` method:\r\n```java\r\nfor (Worker w : this.workers) {\r\n    w.wire(self);\r\n}\r\n```\r\n## Differences from PaniniJ\r\nNote that this is different from PaniniJ. PaniniJ does not allow arbitrary `for` loops in the `design()` declaration, and instead arrays are a little more special. In PaniniJ, arrays of child capsules are declared as such:\r\n```java\r\nWorker[10] workers;\r\n```\r\n\r\nIn the design method, the `wireall` method is used instead of a for loop:\r\n```java\r\nwireall(workers, this);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hridesh/panini/issues/comments/111239685","html_url":"https://github.com/hridesh/panini/pull/25#issuecomment-111239685","issue_url":"https://api.github.com/repos/hridesh/panini/issues/25","id":111239685,"user":{"login":"ddmills","id":4615125,"avatar_url":"https://avatars.githubusercontent.com/u/4615125?v=3","gravatar_id":"","url":"https://api.github.com/users/ddmills","html_url":"https://github.com/ddmills","followers_url":"https://api.github.com/users/ddmills/followers","following_url":"https://api.github.com/users/ddmills/following{/other_user}","gists_url":"https://api.github.com/users/ddmills/gists{/gist_id}","starred_url":"https://api.github.com/users/ddmills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddmills/subscriptions","organizations_url":"https://api.github.com/users/ddmills/orgs","repos_url":"https://api.github.com/users/ddmills/repos","events_url":"https://api.github.com/users/ddmills/events{/privacy}","received_events_url":"https://api.github.com/users/ddmills/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T18:58:37Z","updated_at":"2015-06-11T18:58:37Z","body":"David, I agree with everything you've mentioned above. I was a little disappointed about the assignment size for arrays - but PaniniJ does this as well - when it's declared (`Worker[10] workers;`)\r\n\r\nI'm not sure what process you've been using for deleting branches, but yes this branch can be deleted/archived."}}