I am trying to add a keylistener to my program but run into problems referencing non-static methods from main. Here is the jist of it:
class myprogram {
respondToKey instanceofKeyresponse = new respondToKey();
class respondToKey extends keyAdapter {
dosomething;
}
public void main(){...
If I try an address a object property using a variable it does not work. For example having document.myimage.src having myimage as an image objects name is identified correctly. Substituting a variable for myimage such as newimage=myimage; document.newimage.src is not recognized as a defined...
I created a set of image objects using an array. I try to reference the image object's source image by using the array name and it doesn't work in IE.
For example:
test=new Array("sample1","sample2")
<img src=url name=test[0]>
.
.
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.