Pierre Hébert​ is it possible to subclass a FrameLayout somehow?

Pierre Hébert​ is it possible to subclass a FrameLayout somehow?

]]>
(Next Post) »

17 Commentsto Pierre Hébert​ is it possible to subclass a FrameLayout somehow?

  1. Anonymous says:

    < ![CDATA[

    Not sure what you really mean, not sure if this really works.


    But it’s a start 😛


    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Unfortunately this isn’t possible in the current script engine implementation… Lightning uses 1.7, subclassing classes with no default constructor is in 1.8 🙁

    ]]>

  3. Anonymous says:

    < ![CDATA[

    I already tried prototypes. The problem is: I can’t modify FrameLayouts prototype, it doesn’t seem to have one. I can copy FrameLayouts methods to a new prototype, but this is no subclass of View anymore, and therefore can’t be passed to addView() calls.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Yes, this is exactly the problem, this is not an instance of View. It would work with JavaScript only, but not with other Java components.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    And I can’t override methods like I did it with e.g. Listeners, it throws an error.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Can’t we switch to 1.8 then?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    No unfortunately, I don’t remember why exactly but using 1.7 which was already old when I added scripting was not a choice but a constraint.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    I just saw that 1.7 received two updates in 2015 (previous one was 2012). It seems these new versions includes patches scheduled for 1.8. Maybe it is worth looking at these new versions.


    https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Download_Rhino

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Well there are several fixes regarding prototypes and constructors, so it might help.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    According to here https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scripting_Java there should be a JavaAdapter. I can’t reach it through scripting though.


    Pierre Hébert​ could you make it available?

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Lukas Morawietz this class is obfuscated 🙁 In the current 12.5.1 version it should be b.a.b.as


    I will add it to the list of public classes so that it becomes clearly available.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    I’m not sure if this is the correct class, as it doesn’t seem to have the constructor which it should have. I’ll wait for the next release.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    This will be a beta. I initially wanted to publish it a few days before but I have work to do, maybe this week end.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Beta published with JavaAdapter now visible, however didn’t tested the use of it. Since this class is heavily relying on reflection, I wonder whether other classes would need to be made public too. Please let me know how it works or not.

    ]]>

  15. Anonymous says:

    < ![CDATA[

    I have already submitted my crashreport to you. I’ve found a post that said turning the optimization off might help here.

    ]]>

  16. Anonymous says:

    < ![CDATA[

    It appears that rhino is generating java bytecode and tries to load it. The issue is that Android expects dex code, not java.


    The optimization setting is already disabled: in fact it configures whether to produce native code from javascript, and cannot work on android for the same reason.


    So at the moment I don’t see a solution except to implement a dex byte code factory 🙁

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Seems like the launcher of no limits has met its limit…


    I’ve created an issue at rhinos github repository, but I don’t expect much from it.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *