FileDialog - OnDialogClosed not called anymore

dominggus
17 hours ago
16 hours ago
  • dominggus - 17 hours ago

    Hi, since the latest update it seems the OnDialogClosed is not called anymore??

    using CODESYS SP20 Patch 3 with CODESYS Visualization 4.6.0.0

    I am using LoadWriteRecipe to load a recipe file from disk (with some custom dialog settings), and I need to run a function (Recipes_LoadFromRecipeData()) afterwards which I execute when OnDialogClosed is closed with OK button.

    See attached screenshot and code below:

    ***
    OnDialogClosed : Recipes_OnLoadFileDialogClosed(pClientData):
    ***
    // the DialogManager is provided via the implicitly available VisuManager
    dialogMan :=  VisuElems.g_VisuManager.GetDialogManager();      
    IF dialogMan <> 0 AND pClientData <> 0 THEN
        FileOpenCloseDialog := dialogMan.GetDialog('VisuDialogs.FileOpenSave'); // gets the FileOpenSave dialog
        IF FileOpenCloseDialog <> 0 THEN
            result := FileOpenCloseDialog.GetResult(); // gets the result (OK, Cancel) of the dialog
            IF result = VisuElems.Visu_DialogResult.OK THEN
                Recipes_LoadFromRecipeData();
            END_IF
        END_IF
    END_IF
    
    ***
    OnMouseClick: Execute ST-Code
    ***
    // override FileOpenSave Dialog settings
    // Visu_FbFileListProvider.Initialize(stDirectory, stFilter, stFileIn, stTitle, iRowCount, bBrowseDirectory, bTouch) 
    VisuDialogs.g_FileListProvider.Initialize('./', '*.bunkerrecipe', '', 'Load recipe', 20, TRUE, FALSE);
    VisuDialogs.g_FileListProvider();
    

    This used to work in CODESYS v3.5 SP20 Patch 1, but it seems it doesn't work anymore unfortunately?

    The OnDialogClosed just never seems to be called anymore....

     

    Last edit: dominggus 17 hours ago
  • dominggus - 16 hours ago

    updated to CODESYS Visualization 4.7.0.0, still not working...

     

Log in to post a comment.