Closed Bug 102564 Opened 23 years ago Closed 17 years ago

Components in Java applets get confused on Mozilla for Macintosh

Categories

(Core Graveyard :: Java: OJI, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mozilla, Assigned: yuanyi21)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) (NOTE:  this version 
was used to report the bug but the bug concerns the Macintosh version)
BuildID:    2001100108

    The applet described here displays a serious bug: the wrong component is 
displayed the first time the applet is used after the applet is loaded. The 
source code is given below and a working copy is at 
http://segal.org/ConfusedComponents/index.html
    Clicking the button "Click this button" should show a PopupMenu with 2 
options (Menuitem 1, Menuitem 2).  However, the first time the applet is used 
after the applet is loaded, clicking the button shows the list from the Choice 
component (Choice line 1, Choice line 2).  Subsequent times the button is 
clicked the PopupMenu is shown correctly.  The error with the first click 
occurs consistently each time the applet is loaded.
    There is another error shown by this applet that is intermittent.  
Sometimes only the 2 buttons appear (disabled) and the choice does not appear. 
    This bug does not occur with Internet Explorer 5.0 in the same environment 
(Macintosh OS 9.2, MRJ 2.2.5), although the PopupMenu does not stay up as 
reported previously. The Confused Components problem does not occur using 
Internet Explorer 5.1.1 Preview on OS 10.0.4 as long as you do not click on a 
MenuItem, producing the crashes as reported previously.  Everything is fine on 
Windows with multiple versions of Netscape and Internet Explorer.
     This makes it clear that Netscape/Mozilla has some problem using Apple's 
MRJ that Internet Explorer does not have.

Reproducible: Always
Steps to Reproduce:
Run the applet given at the URL.  Here is the source code:
import java.awt.*;
import java.applet.*;

public class PopTest extends Applet {

Button button;
boolean popupWorks;
PopupMenu pop;
MenuItem[] mi;

public void init()
{
    button = new Button ("Pop up a Menu");
    add(button);
    try
    {
        pop = new PopupMenu();
        mi = new MenuItem[3];
        for (int i=0; i<3; i++)
        {
            mi[i] = new MenuItem("Option " + i);
            pop.add(mi[i]);
        }
        add(pop);
        popupWorks = true;

    }
    catch (Throwable e) 
    {
    popupWorks = false;
    }
}

public boolean action(Event evt, Object obj)
{
    if (popupWorks)
    {
        if (evt.target == button)
        {
            pop.show(button, 100, 10);
            return true;
        }
        else if (evt.target instanceof MenuItem)
        {
            for (int i= 0; i <3; i++) if (evt.target == mi[i])
            {
                button.setLabel("User chose " + mi[i].getLabel());
                invalidate();
                validate();
                break;
            }
        }
    }
    return super.action(evt, obj);
}
} // END OF Class PopTest


Actual Results:  see Description

Expected Results:  see Description

The problem is also found in Netscape 6.01 and Netscape 6.1 for Macintosh
I see this. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Components in Java applets get confused on Mozilla for Macintosh → Components in Java applets get confused on Mozilla for Macintosh
Fixing component, adding beard.
Component: Java APIs to WebShell → OJI
Mac only... taking.
Assignee: edburns → bnesse
*** Bug 112641 has been marked as a duplicate of this bug. ***
We have experienced the same problem with Mac OS 8.6 and Mozilla 1.0 (as well 
as Netscape 6.2). Furthermore, the browser crashes, and leaves the system in an 
unstable state, after selecting anything from either menu. (Our sample applet 
uses two Choice components.)
Hmm, The url specified is no longer valid. Marking invalid.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Changed URL to:
http://segal.org/macjavabugs/ConfusedComponents/index.html
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
This bug is targeted at a Mac classic platform/OS, which is no longer supported
by mozilla.org. Please re-target it to another platform/OS if this bug applies
there as well or resolve this bug.

I will resolve this bug as WONTFIX in four weeks if no action has been taken.
To filter this and similar messages out, please filter for "mac_cla_reorg".
OS: Mac System 9.x → MacOS X
In any event, WFM with a recent Camino nightly trunk build.  Tested with Camino trunk nightly 2006101622 (v1.2+) running under Mac OS 10.3.9.
-> default assignee for old netscape assigned bugs.
Assignee: bnesse → yuanyi21
Status: REOPENED → NEW
QA Contact: avm → zhayupeng
WFM.  We seem to work as intended, and as Safari does, in recent branch builds, as well as the trunk build Kurt tested last fall.
Status: NEW → RESOLVED
Closed: 22 years ago17 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.