Why is IDialogManager.OpenDialog Marked Oboslete?

2023-06-05
2023-06-17
  • thecolonel26 - 2023-06-05

    Why is IDialogManager.OpenDialog Obsoleted? It says to use VisuUtils but VisuUtils is an incomplete interface as it is designed to be called continuously and not be called from the Visu_Task.

    Am I missing something or is Codesys intentionally removing capabilities?

     
  • TimvH

    TimvH - 2023-06-10

    As I understood it, the benefit of using the functions from the VisuUtils library are:
    - not required to call these functions from the Visu Task
    - end-user friendly call of function blocks (follows the common behaviour model)
    - future proof (backward compatible)
    - ...
    So you are motivated to use the function blocks from the VisuUtils library.

    Off course these are function blocks and you have to call them over multiple cycles until xDone is TRUE, because internally it has to wait until the visualization has actually performed this operation.

     
  • thecolonel26 - 2023-06-17

    My question was mainly rhetorical.

    What if you want to Open Dialogs from the VisuTask and not make a mess trying dealing with an asynchronous FB call? You can't using the VisuUtils library. That was my point.

    The common behavior model doesn't always fit well with OOP design. It shouldn't be a one size fits all solution. I am trying to build a UI framework library and I need to call dialogs directly from the VisuTask. If they also provided a syncronous call API in VisuUtils that would be fine, but they didn't which means they removed funcionality.

    Currenly I am using the obsolete library, but since it is Obsoleted that means they'll probably drop support for it at some point and that isn't good long term.

     

Log in to post a comment.