Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I debug "old interface" errors?



Thank you for the replies. I didn't want to lengthen my question by details of my situation, but I see that it would help.

In reply to the many replies I have received:

The target is not just Mac OS, but also any other OS browser, with most of the browsers being Windows. The problem is not theoretical. I wrote the original version using Swing, and found that I was unable to run it on a majority of example "target" machines. These are computers around our hospital, and the goal is for the applet to be accessible from any browser, at any hospital. At our hospital, the computer administrators are very reluctant to install anything new, even a new JVM. Asking all users to install software on their machine would raise the threshold too high, in my opinion.

As a debugging tool, I wrote an applet to find out what VM was running and whether there was Swing. I found all sorts of answers on the hospital computers, with VM's ranging from 1.1.4 to 1.3.x. Some had Swing, some did not.

I have tried to work around it using "indirection", as suggested. I have made "wrapper" classes for each of the gui elements. Each wrapper class instantiates either a Swing or an AWT element, depending on the environment, and the behavior looks the same to the main application.

I am not including Swing class files in the applet.

My question was about trying to debug the problem. I can reproduce it easily by running it in IE, but not within XCode. Therein lies the rub!

DTL

I am trying to write an applet which will use one interface when running on a Swing-enabled browser, and another (AWT) on others that do not have swing. I have made a "proof of concept" simple program, which works, but when I do it on the full program, it appears to work fine when I am in XCode, but when I go to a swingless browser I get an error that a swing class (SpinnerNumberModel) is not found.

I have stepped through the relevant routines on XCode, and find no reference to the offending classes during execution when "swingless". Right now, I have to compile in XCode, then re-start the browser and run the applet to see if the problem is gone, which is a crude form of debugging.

Is there some way to debug an applet in XCode that would generate an error if a Swing class were accessed?

Alternatively, is is possible to set the XCode debug/run environment to be temporarily swingless?

Note that I have the swing classes in the applet, but none are instantiated unless swing is available.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >How do I debug "old interface" errors? (From: David Linker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.