6 days ago
3 days ago
  • jeromebunel

    jeromebunel - 6 days ago

    Hi. I try to use the visu Dialog "VisuDialogs.FileOpenSave;"
    When i open this dailog, all is display correctly.

    When the Dialog is closed, the file name selected by the user is available by calling the GetSelectedFileName method.

    My question is : how to know when this Dialogs windows is closed.

    Thank you

  • sedoerr

    sedoerr - 5 days ago

    Thats a good question. I made it in this way that is looked on the error code. If user canceled the error code will show an error. if he user "load" it will give you a done.

    that was for me the only way to handle this problem.

    Where do you get this parameters?: "stFilter" and "bTouch"

    Do you used this example?

    • jeromebunel

      jeromebunel - 4 days ago

      Hi sedoeer.

      what error code are you talking about?
      What returns this error code ?

      The parameters "stFilter" and "bTouch" are 2 inputs of the Visu_FbFileListProvider.Iniatialize() method.
      It's ok for "stFilter";i saw how does it work in the VisuDialogSt example. But i don't understand what is "bTouch".

      This link doesn't work

      On CoDeSys store, the "Visu File Transfer Example" can't be downloaded. An error msg is send back "Error 403
      Admin access required"

      Thank you

      • kislov

        kislov - 4 days ago

        About bTouch.

        It make sense if you enter a file/dir name (for example, you create new directory)

        bTouch := TRUE ---> using "virtual" keyboard (Keypad from VisuDialogs)
        bTouch := FALSE ---> using hardware keyboard (you got just text input field with blinking cursor)

        • jeromebunel

          jeromebunel - 3 days ago

          Ok Thank you very much.

      • sedoerr

        sedoerr - 4 days ago

        ah sorry i see, i muddled up with file transfering. There is also an dialog for opening files, but a different one.

        Hmm i tried to have a look if i can find something for "btouch" but it seems that this is absolutely undocumented.
        I think it has something to do with the buttons of this dialog?!

        • jeromebunel

          jeromebunel - 3 days ago

          Yes of course the solution is into the Button code or in the Function block.

          Is the source code of its librairy is available ?

  • sedoerr

    sedoerr - 6 days ago
    FUNCTION CheckDialogOpen : BOOL
        sDialogName         : STRING;
        pstClientData       : POINTER TO VisuElems.VisuStructClientData;
        itfDialogManager    : VisuElems.IDialogManager;
        itfMyDialog         : VisuElems.IVisualisationDialog;
    //PrΓΌfen ob Dialogfenster geΓΆffnet
    WHILE (pstClientData := VisuElems.VisuElemBase.g_ClientManager.GetNextClient()) <> 0 DO
        IF LEN(TO_STRING(pstClientData^.GlobalData.CurrentUserName)) <> 0 THEN  //Nur Dialoge fΓΌr den angemeldeten Benutzer prΓΌfen
            itfDialogManager := VisuElems.g_VisuManager.GetDialogManager();
            itfMyDialog := itfDialogManager.GetDialog(sDialogName);
            CheckDialogOpen := VisuDialogs.VisuDlgUtil_IsDialogOpen(itfMyDialog,pstClientData,itfDialogManager);
  • jeromebunel

    jeromebunel - 6 days ago

    Thank you for your answer which corresponds exactly to my question.It works perfectly.
    The problem is, my question was wrong.
    The correct question is: how do you know if the user clicked on "Load" or "Cancel".

    Another question: can you explain how the parameters work: "stFilter" and "bTouch".

    When I put '.ini' or 'ini' in stFilter I expect to only view "ini" files.
    This is not the case.

    thank you so much


Log in to post a comment.