You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by jude <fl...@gmail.com> on 2016/06/07 20:08:59 UTC

[FlexJS] Monkey patching support

Does FlexJS support monkey patching? I copied UIBase into my project, added
properties to it and then tried to build or compile (FlexJS (FalconJX Debug
and Release Build)) and I've been getting errors:


When no compiler arguments before build
   Errors (350 items) ...

When -define=COMPILE::AS3,true -define=COMPILE::JS,true
   Errors (158 items) ...

When -define=COMPILE::AS3,false -define=COMPILE::JS,true
   Errors (96 items)
   Description    Resource    Path    Location    Type
   1024: Overriding a function that is not marked for override
UIBase.as    /FlexJSProject/src/org/apache/flex/core    line 348    Flex
Problem
   1044: interface method element in interface IUIBase not implemented by
class UIBase    UIBase.as    /FlexJSProject/src/org/apache/flex/core
line 141    Flex Problem
    ...

When -define=COMPILE::AS3,true -define=COMPILE::JS,false
   Errors (0 items)

   Runtime Error:
   File not found: org.apache.flex.core.StageProxy

   java.lang.RuntimeException: Unable to find JavaScript filePath for
class: org.apache.flex.core.StageProxy
       at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:179)

Re: [FlexJS] Monkey patching support

Posted by Alex Harui <ah...@adobe.com>.

On 6/7/16, 1:08 PM, "jude" <fl...@gmail.com> wrote:

>Does FlexJS support monkey patching?

Good question.  It isn't quite the same as Flex.  For me, if I set:
   -define=COMPILE::AS3,true -define=COMPILE::JS,false
it compiles cleanly, so that would be the way for monkey-patching SWF code.

For JS code, it would be harder to do monkey-patching with the same
workflow, so instead you directly patch the .JS file and place it in the
right place in frameworks/js/FlexJS/libs.

HTH,
-Alex