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:
The workflow should be highly dependent on autocomplete, then if that's not super obvious browse to definition and everything is made clear possibly with the checking of a few types.
The nature of how things are done makes me think these libraries aren't developed for general use and are actually internal or for partners.
The example projects include objects that don't appear in autocomplete and then lead nowhere obvious when browsing.
Do you consider developer workflow when creating these libraries? Are some libraries really for public use such as Visu Utils and others not? If so which? It's really hard to tell.
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
Why do you develop things like this?
The workflow should be highly dependent on autocomplete, then if that's not super obvious browse to definition and everything is made clear possibly with the checking of a few types.
The nature of how things are done makes me think these libraries aren't developed for general use and are actually internal or for partners.
The example projects include objects that don't appear in autocomplete and then lead nowhere obvious when browsing.
Do you consider developer workflow when creating these libraries? Are some libraries really for public use such as Visu Utils and others not? If so which? It's really hard to tell.