processing/processing — pull request #1818 by fukuchi (2013-05-26 02:43:03+00:00)
Title: Allows to pass an object to selectInput/Output/Folder in order to identify who invoked itself in callback function.

This patch allows you to call selectInput() and similar functions with additional arguments.

Example:
selectOutput("Save as...", "saverFunction", a_pg_graphic);
selectInput("Load CVS...", "loadCVSFile", target_table);

Background:
Passing an object to a callback function is a well-known technique to:
* identify the caller
* passing an object (or an array containing multiple objects)

Previously selectInput/Output/Folder just returned a file name and the caller was responsible to handle the file name. Now callback function has to handle the file name out of the context.

Instead of writing a number of callback functions (e.g. saveTable1(), saveTable2()...) or using a global variable, you can just pass an argument to a single function. More advanced example can be found at [here](https://github.com/fukuchi/processing/commit/473a658332ceed637ad41b74534cdab8487ce1a2).