{"action":"created","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/3996","repository_url":"https://api.github.com/repos/google/flatbuffers","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/3996/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/3996/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/3996/events","html_url":"https://github.com/google/flatbuffers/issues/3996","id":172472095,"number":3996,"title":"Extracting data in JavaScript from buffer returning default schema value rather than updated one","user":{"login":"mi6crazyheart","id":4346688,"avatar_url":"https://avatars.githubusercontent.com/u/4346688?v=3","gravatar_id":"","url":"https://api.github.com/users/mi6crazyheart","html_url":"https://github.com/mi6crazyheart","followers_url":"https://api.github.com/users/mi6crazyheart/followers","following_url":"https://api.github.com/users/mi6crazyheart/following{/other_user}","gists_url":"https://api.github.com/users/mi6crazyheart/gists{/gist_id}","starred_url":"https://api.github.com/users/mi6crazyheart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mi6crazyheart/subscriptions","organizations_url":"https://api.github.com/users/mi6crazyheart/orgs","repos_url":"https://api.github.com/users/mi6crazyheart/repos","events_url":"https://api.github.com/users/mi6crazyheart/events{/privacy}","received_events_url":"https://api.github.com/users/mi6crazyheart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-22T14:48:25Z","updated_at":"2016-08-23T06:48:14Z","closed_at":null,"body":"I've followed the given example from here using PHP. https://google.github.io/flatbuffers/flatbuffers_guide_tutorial.html . In my client side (browser) when I'm parsing buffer data through JavaScript using the following piece of code taken from https://google.github.io/flatbuffers/flatbuffers_guide_use_javascript.html\r\n\r\n    var hp = monster.hp();\r\n    var pos = monster.pos();\r\n\r\n\tconsole.log(\"hp : \"+hp);\r\n\tconsole.log(\"pos : \"+pos);\r\n\r\nI'm getting output as  ``` hp : 100 pos : null ``` whereas I think I should get the ```  hp ```  value as 300 according to this piece of code ```\\MyGame\\Sample\\Monster::AddHp($builder, 300);``` . Am I doing anything wrong ? Else, what I need to do for getting right updated value(300) ?"},"comment":{"url":"https://api.github.com/repos/google/flatbuffers/issues/comments/241642261","html_url":"https://github.com/google/flatbuffers/issues/3996#issuecomment-241642261","issue_url":"https://api.github.com/repos/google/flatbuffers/issues/3996","id":241642261,"user":{"login":"mi6crazyheart","id":4346688,"avatar_url":"https://avatars.githubusercontent.com/u/4346688?v=3","gravatar_id":"","url":"https://api.github.com/users/mi6crazyheart","html_url":"https://github.com/mi6crazyheart","followers_url":"https://api.github.com/users/mi6crazyheart/followers","following_url":"https://api.github.com/users/mi6crazyheart/following{/other_user}","gists_url":"https://api.github.com/users/mi6crazyheart/gists{/gist_id}","starred_url":"https://api.github.com/users/mi6crazyheart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mi6crazyheart/subscriptions","organizations_url":"https://api.github.com/users/mi6crazyheart/orgs","repos_url":"https://api.github.com/users/mi6crazyheart/repos","events_url":"https://api.github.com/users/mi6crazyheart/events{/privacy}","received_events_url":"https://api.github.com/users/mi6crazyheart/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T06:48:14Z","updated_at":"2016-08-23T06:48:14Z","body":"I think I got the thing now. I'm calling following method from ```FlatbufferBuilder.php``` & returning the response data to the AJAX request. It's working now.\r\n\r\n\tpublic function sizedByteArray()\r\n\t{\r\n\t    $start = $this->space;\r\n\t    $length = $this->bb->capacity() - $this->space;\r\n\r\n\t    $result = str_repeat(\"\\0\", $length);\r\n\t    $this->bb->setPosition($start);\r\n\t    $this->bb->getX($result);\r\n\r\n\t    return $result;\r\n\t}"}}
{"actor":{"display_login":"mi6crazyheart"}}