B4J Question Noob Java Question

B_FISH

Member
Licensed User
Longtime User
HI

I'm converting a native Java applet to BASIC 4 Android.

There are several .java files each one containing a single class definition.

There is a "main" file plus four additional .java files; each of these 4 is referenced in the "main" .java file by defining a variable and specifying the variable type as one of the 4 class names.

So far, so good???

Now, in the "main" file there is a function named "update" defined containing a few dozen lines of code.

However, I can find NO reference to where that function is called; neither in the "main" file itself, nor any of the other class files (where I wouldn't expect to find it referenced, anyway).

I KNOW that "update" is being called from somewhere because the applet works correctly.

I'm going bonkers trying to find the call to "update". Can anyone make a suggestion??

B_FISH
 

Daestrum

Expert
Licensed User
Longtime User
I would guess the 'update' routine is called from the browser ie externally to the applet.
 
Upvote 0

B_FISH

Member
Licensed User
Longtime User
Not knowing Java (much) I assume you mean the call to "update" is made directly from the HTML page in which the applet is embedded???

I didn't know that was possible; even so, I checked the html page and found know reference to "update" in there either.

Thanks anyhow.

B_FISH
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Just a guess...

Does the 'main' class implement an interface and the 'update' method is a callback required by the interface?
Has the 'update' method been annotated with '@override'?
 
Upvote 0

B_FISH

Member
Licensed User
Longtime User
Question is related to B4A. But thought might get more responses in B4J section. Sorry if I posted in wrong area.

Warwound, I will check your suggestions.
 
Upvote 0

B_FISH

Member
Licensed User
Longtime User
Just in case one of you experts wouldn't mind taking a quick look at the source (and maybe spotting my issue), I'm uploading it with this message. The main module is LED.java.

This was a java applet to embed in a web page and provided an animated (scrolling) signboard, similar to those you see advertising almost anything in stores, shop windows, etc.

I believe it was created almost 20 years ago by a college student named Darrick Browne.

I thought converting it to a B4A app would make a great first (learning) project.

Thanks

B_FISH
 

Attachments

  • LED.zip
    15.8 KB · Views: 209
Last edited:
Upvote 0
Top