{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel-ui/issues/99","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel-ui/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel-ui/issues/99/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel-ui/issues/99/events","html_url":"https://github.com/HaxeFlixel/flixel-ui/issues/99","id":68197860,"number":99,"title":"Class cast error in openfl-next","user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-13T21:23:53Z","updated_at":"2015-04-14T14:45:52Z","closed_at":null,"body":"This only seems to happen when using -Dnext, and it may very well be an openfl issue and not a flixel issue, but I'm reporting it here for now.\r\n\r\nIn short, something about FlxUIRadioGroups causes a crash in next but not in legacy.\r\n\r\nTo reproduce:\r\n```lime test neko -Dnext``` for the [RPG Interface](https://github.com/HaxeFlixel/flixel-demos/tree/dev/User%20Interface/RPG%20Interface) demo\r\n\r\n\r\n```\r\nT:\\Development\\Git\\flixel-demos\\User Interface\\RPG Interface>lime test neko -Dne\r\nxt\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nlibpng warning: iCCP: known incorrect sRGB profile\r\nCalled from ? line 1\r\nCalled from ApplicationMain.hx line 130\r\nCalled from ApplicationMain.hx line 63\r\nCalled from lime/app/Application.hx line 158\r\nCalled from lime/_backend/native/NativeApplication.hx line 102\r\nCalled from lime/app/Event.hx line 59\r\nCalled from lime/app/Application.hx line 519\r\nCalled from openfl/display/Stage.hx line 882\r\nCalled from openfl/display/DisplayObjectContainer.hx line 661\r\nCalled from openfl/display/DisplayObject.hx line 985\r\nCalled from openfl/events/EventDispatcher.hx line 266\r\nCalled from flixel/FlxGame.hx line 531\r\nCalled from flixel/FlxGame.hx line 687\r\nCalled from flixel/FlxGame.hx line 707\r\nCalled from flixel/FlxGame.hx line 622\r\nCalled from State_Title.hx line 35\r\nCalled from flixel/addons/ui/FlxUIState.hx line 181\r\nCalled from flixel/addons/ui/FlxUIState.hx line 291\r\nCalled from flixel/addons/ui/FlxUI.hx line 652\r\nCalled from flixel/addons/ui/FlxUI.hx line 701\r\nCalled from flixel/addons/ui/FlxUI.hx line 1253\r\nCalled from flixel/addons/ui/FlxUI.hx line 2077\r\nCalled from flixel/addons/ui/FlxUIRadioGroup.hx line 14\r\nCalled from flixel/addons/ui/FlxUIRadioGroup.hx line 115\r\nCalled from flixel/addons/ui/FlxUIRadioGroup.hx line 186\r\nCalled from flixel/addons/ui/FlxUIRadioGroup.hx line 380\r\nCalled from flixel/addons/ui/FlxUIRadioGroup.hx line 442\r\nUncaught exception - Class cast error\r\n```"},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel-ui/issues/comments/92887166","html_url":"https://github.com/HaxeFlixel/flixel-ui/issues/99#issuecomment-92887166","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel-ui/issues/99","id":92887166,"user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T14:45:52Z","updated_at":"2015-04-14T14:45:52Z","body":"Alrighty, I think I found our problem.\r\n\r\nTake a look at openfl's TextFormatAlign:\r\nhttps://github.com/openfl/openfl/blob/master/openfl/text/TextFormatAlign.hx\r\n\r\nIf we're in legacy mode we'll use this one:\r\nhttps://github.com/openfl/openfl/blob/master/openfl/_legacy/text/TextFormatAlign.hx\r\n\r\n```\r\nclass TextFormatAlign \r\n{\r\n\tpublic static var LEFT = \"left\";\r\n\tpublic static var RIGHT = \"right\";\r\n\tpublic static var CENTER = \"center\";\r\n\tpublic static var JUSTIFY = \"justify\";\r\n}\r\n```\r\n\r\nIf we're in next mode it uses this one:\r\n\r\n```\r\nenum TextFormatAlign {\r\n\tLEFT;\r\n\tRIGHT;\r\n\tJUSTIFY;\r\n\tCENTER;\r\n}\r\n```\r\n\r\nI bet that has a lot to do with it."}}