Skip to content

selectInput(string,string,File) opens dialog at the wrong path half the time #535

Closed
@processing-bot

Description

@processing-bot

Created by: puebloDeLaMuerte

Description

First i am creating a file to represent the sketch-floder like so: File f = new File(sketchPath());
Then, when calling selectInput("somestring","somestring",f); the input-dialog shows up as expected.
What's odd is that it opens at the wrong path 50% of the time. On repeated calls the dialog opens at the sketch path half of the time, the other half it opens at it's parent directory, alternating between the two.

Expected Behavior

I expect selectInput(string,string,file) to always open the dialog at the folder specified by File f.

Current Behavior

The dialog opens at the location given in File f. Every other time it's called it opens the dialog window at the parentDirectory of File f

Steps to Reproduce

void draw() {
  
}

void keyPressed() {
  
  if( key == 'e' ) {
    File f = new File(sketchPath());
    println(f.getAbsolutePath());
    selectInput("open file", "openFile", f);
  }
}

Your Environment

  • Processing version: 4.0.1 (also ovserved on 4.0.b4)
  • Operating System and OS version: macOS Monterey 12.4 - AppleSilicon M1
  • Other information: problem appears in different sketches, when run from the IDE and from a Exported Executable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions