# selectInput cannot find symbol

**URL:** <https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820>\
**Category:** Development\
**Created:** [March 25, 2021, 7:28am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820 "2021-03-25T07:28:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [March 25, 2021, 7:28am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/1 "2021-03-25T07:28:18Z")

</div>

Hi, wandering if anyone can help please.

I’m struggling to build my latest library as the fileInput class is causing errors.

eclipse terminates the build process with the error

```auto
error: cannot find symbol
    [javac] selectInput("Select a file to process:", "folderSelected");

```

I’m not sure what this means and am unsure how to resolve this.

Many thanks

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [March 25, 2021, 8:10am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/2 "2021-03-25T08:10:11Z")

</div>

would changing the PApplet method to static make a difference, because I cannot call the function explicitly as it isnt static.

---

<div class="post-metadata">

**Author:** ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Post date:** [March 25, 2021, 8:32am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/3 "2021-03-25T08:32:15Z")

</div>

Hi @paulgoux

Does the example on the link below works for you?  
[https://www.processing.org/reference/selectInput\_.html](https://www.processing.org/reference/selectInput_.html)

Best regards

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [March 25, 2021, 8:33am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/4 "2021-03-25T08:33:37Z")

</div>

It works fine from the processing pde, but i cannot call it in a class in eclipse.

---

<div class="post-metadata">

**Author:** ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Post date:** [March 25, 2021, 8:43am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/5 "2021-03-25T08:43:03Z")

</div>

Did you try passing the PApplet to the constructor of the class and use it when selecting a file?  
I think the problem is that the selectInput() assumes invocation by the main-sketch

```auto
public class Foo{
  private final PApplet pa;
 
  public Foo(PApplet p) {
    pa = p;
  }

public Foo chooseFile() {
    // Assumes PApplet's reference. Won't find callback:
    //pa.selectInput("Select a mesh to process:", "fileSelected");
 
    // Specifies Foo's reference. Callback is found:
    pa.selectInput("Select a mesh to process:", "fileSelected", null, this);
 
    return this;
  }

public void fileSelected(File selection) {
    final String path;
 
    if (selection == null){
      pa.println("Window was closed or the user hit cancel.");
    } else {
      pa.println("File selected.");
    }
 }
 

```

Others have had this problem as well:

> **Links**
>
> [selectinput() in a class - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/1418/selectinput-in-a-class)  
> [selectInput(); in a class in Eclipse, callback not found - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/2444/selectinput-in-a-class-in-eclipse-callback-not-found)

Best regards

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [March 25, 2021, 8:44am UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/6 "2021-03-25T08:44:35Z")

</div>

Ive tried passing the papplet and extending the class using papplet

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [March 26, 2021, 3:21pm UTC](https://discourse.processing.org/t/selectinput-cannot-find-symbol/28820/7 "2021-03-26T15:21:47Z")

</div>

Couldnt find a solution so i coded my own window file browser.
