{"id":123,"date":"2009-07-03T15:59:07","date_gmt":"2009-07-03T13:59:07","guid":{"rendered":"http:\/\/blog.ansuz.nl\/?p=123"},"modified":"2009-07-03T15:59:07","modified_gmt":"2009-07-03T13:59:07","slug":"away3d-in-haxe-problem","status":"publish","type":"post","link":"http:\/\/blog.ansuz.nl\/index.php\/2009\/07\/03\/away3d-in-haxe-problem\/","title":{"rendered":"Away3D in HaXe problem"},"content":{"rendered":"<p>I tried getting Away3D to run using Haxe, but it keeps on throwing an error at run time when I&#8217;m calling View3D.render() on every frame:<\/p>\n<blockquote><p>TypeError: Error #1034: Type Coercion failed: cannot convert flash.utils::Dictionary@157e1c1 to Function.<br \/>\nat MethodInfo-1076()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/haxeutils\/HashMap.hx:50]<br \/>\nat away3d.core.utils::CameraVarsStore\/reset()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/core\/utils\/CameraVarsStore.hx:147]<br \/>\nat away3d.containers::Scene3D\/update()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/containers\/Scene3D.hx:186]<br \/>\nat away3d.containers::Scene3D\/onUpdate()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/containers\/Scene3D.hx:85]<br \/>\nat flash.events::EventDispatcher\/dispatchEventFunction()<br \/>\nat flash.events::EventDispatcher\/dispatchEvent()<br \/>\nat away3d.containers::View3D\/notifySceneUpdate()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/containers\/View3D.hx:334]<br \/>\nat away3d.containers::View3D\/render()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/containers\/View3D.hx:921]<br \/>\nat com.dare.haxetest.core::Away3DTest\/enterFrameHandler()[C:\\Projects\\HaXe\\test03_away3d\\src\/com\/dare\/haxetest\/core\/Away3DTest.hx:222]<\/p><\/blockquote>\n<p>From a <a href=\"http:\/\/code.google.com\/p\/away3d\/source\/detail?r=1245\" target=\"_blank\">commit message in SVN<\/a> it looks like there is a problem with using Dictionaries in HaXe. As the HashMap class still uses a Dictionary this error seems to be happening. I tried converting it to use the Hash class instead of a Dictionary, but that introduced other problems.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>I tried getting Away3D to run using Haxe, but it keeps on throwing an error at run time when I&#8217;m calling View3D.render() on every frame: TypeError: Error #1034: Type Coercion failed: cannot convert flash.utils::Dictionary@157e1c1 to Function. at MethodInfo-1076()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/haxeutils\/HashMap.hx:50] at away3d.core.utils::CameraVarsStore\/reset()[C:\\Projects\\HaXe\\test03_away3d\\src\/away3d\/core\/utils\/CameraVarsStore.hx:147] &hellip; <a href=\"http:\/\/blog.ansuz.nl\/index.php\/2009\/07\/03\/away3d-in-haxe-problem\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90],"tags":[],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-haxe"],"_links":{"self":[{"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/comments?post=123"}],"version-history":[{"count":2,"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":125,"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/posts\/123\/revisions\/125"}],"wp:attachment":[{"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.ansuz.nl\/index.php\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}