While in developer testing in debug mode the application failed to call the callback function. I put a try catch block and found this error:
FATAL Exception: Can’t find method com.servoy.extensions.plugins.file.FileProvider.js_showFileOpenDialog(number,null,boolean,[Ljava.lang.Object;,com.servoy.j2db.persistence.ScriptMethod,string). (K:\Flying_Club\FlyingClubTuition\forms\student_import_csv.js#40)
I have two other places of the same code and they work. What could I have done to whack this file?
Here is the code:
function onAction_import_student_from_flight_sheet() {
scopes.ui_converters.progress_messages = ‘’;//clear
scopes.ui_converters.output_progress(‘Starting Import for Student Information’);
try{
// var obj = plugins.file.showFileOpenDialog(1, null, false, new Array(“csv and txt”, “csv”, “txt”), callback_function_csv_file_selected);
// plugins.file.showFileOpenDialog(1, null, false, new Array(“csv and txt”, “csv”, “txt”), callback_function_csv_file_selected);
var obj = plugins.file.showFileOpenDialog(1,null,false,new Array(‘csv and txt’, ‘csv’, ‘txt’),callback_function_student_csv,‘Select Student csv to import’)
} catch(e){
var msg = 'Exception: ’ + e.message;
plugins.dialogs.showErrorDialog(‘Import Student’,'Exception: ’ + e.message,‘Ok’);
scopes.ui_converters.output_progress(msg, LOGGINGLEVEL.FATAL);
return;
}
And the start of the callback is:
function callback_function_student_csv(files) {
scopes.ui_converters.resetProgress();
var msg = ‘’;
if(!files){
msg = “ERROR no files selected”;
scopes.ui_converters.output_progress(msg);
plugins.webnotificationsToastr.error(msg);
return;
}
Servoy 2025.6.2.4084, windows 10, Firefox Browser