Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Hi all,
in Visu Utils there is a FbOpenDialogExtended which has a parameter itfDialogOpenedListener of type IDialogOpenedListener, however that is not exposed anywhere and thus not implementable. Anyone knows why?
Codesys 3.5.14.0 with target Codesys 3.5.14.7.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Marcel,
the interface has DialogOpened and ActionDone method only (deducted from autocompletion)?
Asking because, as you can see from the images, the interface is hidden (and the tooltip on DialogOpened suggesting to read IDialogOpenedListener documentation for further information sounds like a joke...)
For general reference, "Implement Interfaces" does not work ("No methods found") because interface is hidden.
However, there is a workaround:
1. declare a FB implementing the interface you want. We'll call it FBI.
2. declare in a scratch POU a variable of the hidden interface you want to implement. We'll call it "itf"
3. then write in the implementation of the POU "itf." and then invoke autocomplete (CTRL+Space); a list of methods will appear.
4. for each method shown (one could also autocomplete and then copy paste the name of the method/property), right click on FBI, and select "Add Object" -> "Method", then insert the method name. If you did it right, "Return type" will be grayed out.
5. when you'll click OK, the method interface will have all the correct arguments and comments from library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
in Visu Utils there is a FbOpenDialogExtended which has a parameter itfDialogOpenedListener of type IDialogOpenedListener, however that is not exposed anywhere and thus not implementable. Anyone knows why?
Codesys 3.5.14.0 with target Codesys 3.5.14.7.
Hey,
it is VisuElems.VisuElemBase.IDialogOpenedListener
Best regards,
Marcel
Hello Marcel,
the interface has DialogOpened and ActionDone method only (deducted from autocompletion)?
Asking because, as you can see from the images, the interface is hidden (and the tooltip on DialogOpened suggesting to read IDialogOpenedListener documentation for further information sounds like a joke...)
Last edit: sgronchi 2020-07-13
Idk why it was hidden. But you can still implement it
For general reference, "Implement Interfaces" does not work ("No methods found") because interface is hidden.
However, there is a workaround:
1. declare a FB implementing the interface you want. We'll call it FBI.
2. declare in a scratch POU a variable of the hidden interface you want to implement. We'll call it "itf"
3. then write in the implementation of the POU "itf." and then invoke autocomplete (CTRL+Space); a list of methods will appear.
4. for each method shown (one could also autocomplete and then copy paste the name of the method/property), right click on FBI, and select "Add Object" -> "Method", then insert the method name. If you did it right, "Return type" will be grayed out.
5. when you'll click OK, the method interface will have all the correct arguments and comments from library.
I think in the latest CODESYS version the compiler team improved the "implements interfaces" functionality