I think that I have a quite strange question. I am using a class -in an already existing code- that was primarily used to open a Save Dialog window. The code that was used is the below:
String savedName;
if (OperatingSystem.isMacOSX()) {
savedName = showFileDialog(parentView, dialogTitle, contentType, name, true);
} else {
savedName = showFileChooser(parentView, dialogTitle, contentType, name, true);
}
so what I did is to put it into block comment and now I would like to save the project, by using a different name every time that the class is called. This name will be taken from an array using this code:
int m = 0;
for (HomePieceOfFurniture piece : home.getFurniture()) {
if (piece.isVisible()) {
m++;
} } // A table used to save the names of the furniture and initialize it
String [] Furniture = new String[m];
m = 0;
for (HomePieceOfFurniture piece : home.getFurniture()) {
if (piece.isVisible()) {
// "a" is used to save the name of the furniture piece
String a = piece.getName();
Furniture[m] = a;
//System.out.printf(Furniture[m]);
m++;
}
}
What I want is a tip to find how I can understand how this class is called.
Thanks in advance.
If you want to call the original method (the first snippet) with a filename as a parameter, modify the method to accept an addition parameter called savedName, remove the declaration inside the method, and leave the rest as-is.
Then call it from your new code that creates the filename.