GithubHelp home page GithubHelp logo

Comments (11)

alexp-sssup avatar alexp-sssup commented on May 12, 2024

The applet tag is outside of the <body>. That is very suspicious. Also, cheerpjCreateDisplay is not required when converting applets.

from cheerpj-meta.

werthsache avatar werthsache commented on May 12, 2024

Thank you for the quick answer... I removed the cheerpjCreateDisplay and placed the applet-tag within the body-environment but still the same. I get "Cheerpj Runtime Ready", then "graphics system is initializing", then "loading..." and nothing shows. Here's my litte test program:

  import java.awt.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.applet.Applet;

public class Smapplet extends Applet implements ActionListener
  {

    Button b;

    public void init ()
    {
        b = new Button ("HUHU");
        this.add(b);
        b.addActionListener(this);
    }

  @Override
  public void actionPerformed(ActionEvent e) {
    System.out.println("Action");
  }
}

It shows a button with HUHU and if you press it, it writes action on the console (if present;). Attached also my jar and jar.js in as single zip ... thank you so!

Archiv.zip

from cheerpj-meta.

alexp-sssup avatar alexp-sssup commented on May 12, 2024

The bug is an unexpected side effect of using the custom cheerpj-applet tag. Since the style for the custom tag is defined in a special css file there is a race condition where the applet tag can be converted too soon, when it's styling it's not yet properly known. Use a plain <applet> tag. We will add an internal task about this problem and let you know when it's fixed.

from cheerpj-meta.

werthsache avatar werthsache commented on May 12, 2024

Ok... this worked and I am a way further, thanks a lot! It now runs under chrome and even firefox. With safari I get a "is not allowed by Access-Control-Allow-Origin" error, but this might be a safari thing.

Most important is: Do use

<script src="https://cjrtnc.leaningtech.com/1.2/loader.js"></script>

instead of

<script src="https://cjrtnc.leaningtech.com/current/loader.js"></script>

as the current version brings an Uncaught ReferenceError: cheerpjInit is not defined error for some reason I don't understand!

Thank you for your great support!

from cheerpj-meta.

alexp-sssup avatar alexp-sssup commented on May 12, 2024

Please use 1.3 instead of 1.2. The other error is caused by a typo, the endpoint is latest not current.

from cheerpj-meta.

werthsache avatar werthsache commented on May 12, 2024

There is an issue, but by trying to reproduce the error I did a typo. When I use 1.3 I get an loader.js:397 Uncaught ReferenceError: cheerpjFree is not defined error which does not occur with 1.2. I apology for the confuse!

from cheerpj-meta.

alexp-sssup avatar alexp-sssup commented on May 12, 2024

Can you provide a full archive that shows the problem with 1.3?

from cheerpj-meta.

werthsache avatar werthsache commented on May 12, 2024

Yes of course! I have to mention, that I did the conversion with the cheerpj_1.3/cheerpjfy.py version, that I downloaded recently from your page.

ar.zip

from cheerpj-meta.

alexp-sssup avatar alexp-sssup commented on May 12, 2024

I cannot see any problem with 1.3. I suspect you might have seen a temporary failure at the CDN level since 1.3 is new and not fully cached yet. I recommend to clear you browser caches and try again.

from cheerpj-meta.

werthsache avatar werthsache commented on May 12, 2024

Amazing, you are absolutely right! Thanks!

from cheerpj-meta.

alexp-sssup avatar alexp-sssup commented on May 12, 2024

This issue is fixed in our master branch, the fix will be included in the upcoming release.

from cheerpj-meta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.