Hello,
I use the D.eval API (http://www.riaone.com/products/deval/index.html) and
try to import classes using D.importClass().
The problem is that when I try to use an imported class  into a D.eval
call, I get a runtime error (the compilation is OK) :
  Error: msg.rt.no.class

Here is a minimal example followed by the complete error message :


<?xml version="1.0" encoding="utf-8"?>
 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
creationComplete="init()"
layout="vertical" cornerRadius="0" alpha="1.0"
backgroundGradientAlphas="[1.0,
1.0]" backgroundGradientColors="[#EF0808, #F6E8E8]" color="#22B21B"
borderColor="#202FC1">
     <mx:Script>
     <![CDATA[

     import r1.deval.D;

     public function init():void {
     D.importClass(Label);
     D.eval("new Label();");
     }

     ]]>
     </mx:Script>
</mx:Application>



The compilation is OK, but when trying to execute the swf it produce the
following error:

Runtime Error: msg.rt.no.class [line:1]
    at r1.deval.rt::CallExpr/getAny()
    at r1.deval.rt::ExprStmt/exec()
    at r1.deval.rt::Block/exec()
    at r1.deval.rt::Block/run()
    at r1.deval.rt::Env$/run()
    at r1.deval::D$/eval()
    at test/init()
    at test/___test_Application1_creationComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()
    at mx.core::UIComponent/callLaterDispatcher()


I also tried to use :
  D.eval("new String();")

and then it works fine...any idea where it could come from?


Delete & Prev | Delete & Next
Déplacer vers : 

Reply via email to