Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28053 > unrolled thread

Applet instances

Started byRoedy Green <see_website@mindprod.com.invalid>
First post2014-04-12 21:29 -0700
Last post2014-04-13 17:24 -0700
Articles 3 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Applet instances Roedy Green <see_website@mindprod.com.invalid> - 2014-04-12 21:29 -0700
    Re: Applet instances Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2014-04-13 21:33 +0800
      Re: Applet instances Roedy Green <see_website@mindprod.com.invalid> - 2014-04-13 17:24 -0700

#28053 — Applet instances

FromRoedy Green <see_website@mindprod.com.invalid>
Date2014-04-12 21:29 -0700
SubjectApplet instances
Message-ID<ah4kk9lbgvhjdm2m2o494bt0tg15faofno@4ax.com>
If you have multiple instances of an Applet on page, how can they give
error messages to tell you which one is having a problem.  I have 
added <parameter name="instance" value="10"> with unique values to
each instance.

Is there an easier way?
-- 
Roedy Green Canadian Mind Products http://mindprod.com
"Don't worry about people stealing an idea; if it's original, you'll
 have to shove it down their throats." 
~ Howard Aiken (born: 1900-03-08 died: 1973-03-14 at age: 73)

[toc] | [next] | [standalone]


#28060

FromRichard Maher <maher_rjSPAMLESS@hotmail.com>
Date2014-04-13 21:33 +0800
Message-ID<lie3ms$5t3$1@speranza.aioe.org>
In reply to#28053
On 4/13/2014 12:29 PM, Roedy Green wrote:
> If you have multiple instances of an Applet on page, how can they give
> error messages to tell you which one is having a problem.  I have
> added <parameter name="instance" value="10"> with unique values to
> each instance.
>
> Is there an easier way?
>

I thought there was but looking at my code (which I hope to finish over 
easter) I just use static variables and an array of my <windowSlot> 
class. If there's a null entry use that else .add() it on the ArrayList etc.

I'll check again next w/e 'cos iirc the Applet thread gets a unique 
index for each instance so I'm guessing there's some intrinsic attribute 
somewhere.

[toc] | [prev] | [next] | [standalone]


#28077

FromRoedy Green <see_website@mindprod.com.invalid>
Date2014-04-13 17:24 -0700
Message-ID<e9amk9p49nl22f0d5eerq6envpp00ea8te@4ax.com>
In reply to#28060
On Sun, 13 Apr 2014 21:33:16 +0800, Richard Maher
<maher_rjSPAMLESS@hotmail.com> wrote, quoted or indirectly quoted
someone who said :

>I'll check again next w/e 'cos iirc the Applet thread gets a unique 
>index for each instance so I'm guessing there's some intrinsic attribute 
>somewhere.

with the old APPLET tag there was name=. I think it has disappeared in
HTML5 OBJECT. Logically ID= should work, but I don't think there is a
method to read it.

In my case, I generate the OBJECT tags with a macro generator, so it
is no problem to add a sequence number on page parameter to uniquely
identify applets.

<param name="instance" value="12">

I suspect that using static for communication will have the same
problem.  If the browser starts putting your Applets in different
JVMs, they will each get their own static area.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
"Don't worry about people stealing an idea; if it's original, you'll
 have to shove it down their throats." 
~ Howard Aiken (born: 1900-03-08 died: 1973-03-14 at age: 73)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web