gctrl.pde doesn't work in Mac

edited February 2018 in Arduino

Hello:

I just installed processing on my Mac High Sierra version 10.13.3 and when try to run gctrl.pde does not work. When executing

String result = (String) JOptionPane.showInputDialog (this,
  "Select the serial port that corresponds to your Arduino board.",
  "Select serial port",
  JOptionPane.PLAIN_MESSAGE,
  null,
  Serial.list (),
  0);

gives problems in the showInputDialog function.

Someone could help me?

Answers

  • Can you please post a MCVE? How exactly are you running this? What exactly do you mean when you say it "gives problems"?

  • gctrl.pde appears to be this:

    https://github.com/damellis/gctrl/blob/master/gctrl.pde

    (i've also changed the title so that it doesn't look like the whole of processing is broken on a mac.)

  • edited February 2018

    @WATERBRAIN -- Are you in fact using the gctrl.pde that koogs linked ? Which version of Processing did you install? That code is from 2013 -- so that would presumably have been previously working (?) on Processing 2, not Processing 3.

  • (the quoted error is line 31 of the github project)

  • Solved

    JFrame frame = new JFrame("Select the serial port that corresponds to your Arduino board."); String result = (String) JOptionPane.showInputDialog(frame, "Select the serial port that corresponds to your Arduino board.", "Select serial port", JOptionPane.PLAIN_MESSAGE, null, Serial.list(), 0);

    It seems that JFrame must be explicitly stated. Thank you very much to all.

  • I don't think that solution makes a ton of sense. You aren't even showing the JFrame. What error are you getting?

Sign In or Register to comment.