{"action":"created","issue":{"url":"https://api.github.com/repos/xjsframework/xjs/issues/87","repository_url":"https://api.github.com/repos/xjsframework/xjs","labels_url":"https://api.github.com/repos/xjsframework/xjs/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/xjsframework/xjs/issues/87/comments","events_url":"https://api.github.com/repos/xjsframework/xjs/issues/87/events","html_url":"https://github.com/xjsframework/xjs/issues/87","id":143439083,"number":87,"title":"setSourceOrder causes error","user":{"login":"LtSquigs","id":1436831,"avatar_url":"https://avatars.githubusercontent.com/u/1436831?v=3","gravatar_id":"","url":"https://api.github.com/users/LtSquigs","html_url":"https://github.com/LtSquigs","followers_url":"https://api.github.com/users/LtSquigs/followers","following_url":"https://api.github.com/users/LtSquigs/following{/other_user}","gists_url":"https://api.github.com/users/LtSquigs/gists{/gist_id}","starred_url":"https://api.github.com/users/LtSquigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LtSquigs/subscriptions","organizations_url":"https://api.github.com/users/LtSquigs/orgs","repos_url":"https://api.github.com/users/LtSquigs/repos","events_url":"https://api.github.com/users/LtSquigs/events{/privacy}","received_events_url":"https://api.github.com/users/LtSquigs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-25T06:41:22Z","updated_at":"2016-03-25T06:59:56Z","closed_at":null,"body":"Trying to use setSourceOrder, with an array of IDs, on a scene object causes the error\r\n\r\n\"Uncaught ReferenceError: SourcesListUpdate is not defined\"\r\n\r\nand the sources dont seem to get changed.\r\n\r\nCan't find specific code thats causing this, may be a bug in XSplit itself?"},"comment":{"url":"https://api.github.com/repos/xjsframework/xjs/issues/comments/201174418","html_url":"https://github.com/xjsframework/xjs/issues/87#issuecomment-201174418","issue_url":"https://api.github.com/repos/xjsframework/xjs/issues/87","id":201174418,"user":{"login":"dcefram","id":687325,"avatar_url":"https://avatars.githubusercontent.com/u/687325?v=3","gravatar_id":"","url":"https://api.github.com/users/dcefram","html_url":"https://github.com/dcefram","followers_url":"https://api.github.com/users/dcefram/followers","following_url":"https://api.github.com/users/dcefram/following{/other_user}","gists_url":"https://api.github.com/users/dcefram/gists{/gist_id}","starred_url":"https://api.github.com/users/dcefram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcefram/subscriptions","organizations_url":"https://api.github.com/users/dcefram/orgs","repos_url":"https://api.github.com/users/dcefram/repos","events_url":"https://api.github.com/users/dcefram/events{/privacy}","received_events_url":"https://api.github.com/users/dcefram/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T06:59:56Z","updated_at":"2016-03-25T06:59:56Z","body":"`Uncaught ReferenceError: SourcesListUpdate is not defined` is not really a bug, it's just an 'event' of some sort that notifies the plugin that the sources list order has been updated. Just adding a dummy `window.SourcesListUpdate` would suffice (I'll add that up on the generator-xjs too, I missed that out).\r\n\r\nI tested setSourceOrder on my end, and it works. Could you try adding up a catch statement after setSourceOrder to check out if it's throwing up some error message?\r\n\r\n```javascript\r\nscene.setSourceOrder(sourcesArray).catch(function(error) {\r\n  console.error(error.message);\r\n});\r\n```\r\n\r\nPlease do take note that setSourceOrder will not work in source plugins. It will only work on Extension Plugins and in the Source Props window."}}