|
Author |
Topic: 'alt' button bug under processing 68 and w2k (Read 1031 times) |
|
bork Guest
|
'alt' button bug under processing 68 and w2k
« on: Apr 12th, 2004, 8:30am » |
|
hiya, i'm using processing 68 under w2k. there seems to be a bug involving the 'alt' key. hitting the 'alt' key results in a null pointer exception. specifically, when i run the code below, i get the error message which follows. note that to run the code, you'll have to provide your own insertImageHere.jpg in the data directory of the sketch. -josh- > ========================================== > > BImage Pushpins; > int numberOfPoints; > > void setup() { > size(1200, 900); > numberOfPoints = 0; > Pushpins = loadImage("insertImageHere.jpg"); > println("Image width: " + Pushpins.width); > println("Image height: " + Pushpins.height); > println("---------------------------------"); > println("Registration box corners:"); > println("X-pos\tY-pos"); > println("---------------------------------"); > imageMode(CORNER); > ellipseMode(CENTER_DIAMETER); > cursor(CROSS); > image(Pushpins, 0, 0, width, height); > } > > void loop() { > } > > void mousePressed() { > if (numberOfPoints < 4) { > fill(0, 0, 255); > ellipse(mouseX, mouseY, 10, 10); > print(mouseX); > print("\t"); > print(mouseY); > print("\n"); > if (numberOfPoints == 3) { > println("---------------------------------"); > println("Pushpin locations:"); > println("#\tX-pos\tY-pos"); > println("---------------------------------"); > } > } > else { > fill(255, 0, 0); > ellipse(mouseX, mouseY, 10, 10); > print(numberOfPoints - 3); > print("\t"); > print(mouseX); > print("\t"); > print(mouseY); > print("\n"); > } > numberOfPoints = numberOfPoints + 1; > } > > ========================================== > > java.lang.NullPointerException > > at > javax.swing.SwingUtilities.getWindowAncestor(SwingUtilities.java:63) > > at > com.sun.java.swing.plaf.windows.WindowsPopupMenuUI$AltProcessor.altRelea sed( WindowsPopupMenuUI.java:115) > > at > com.sun.java.swing.plaf.windows.WindowsPopupMenuUI$AltProcessor.postProc essK eyEvent(WindowsPopupMenuUI.java:13 > > at > java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFoc usMa nager.java:603) > > at > java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboard Focu sManager.java:765) > > at > java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboard Focu sManager.java:69 > > at > java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusM anag er.java:559) > > at java.awt.Component.dispatchEventImpl(Component.java:3509) > > at java.awt.Container.dispatchEventImpl(Container.java:1623) > > at java.awt.Component.dispatchEvent(Component.java:3480) > > at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) > > at > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea d.ja va:197) > > at > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread. java :150) > > at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) > > at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) > > at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) >
|
|
|
|
|