What's the point of having a lot of this kind of writing in the code? #3419
Answered
by
andydotxyz
junmaqiang
asked this question in
Q&A
-
Checklist
Is your feature request related to a problem?
why write like this? Is it possible to construct a solution with the existing API?why write like this Describe the solution you'd like to see.why write like this |
Beta Was this translation helpful? Give feedback.
Answered by
andydotxyz
Nov 21, 2022
Replies: 3 comments
-
This seems like a general question, probably better targetted as a discussion, converting |
Beta Was this translation helpful? Give feedback.
0 replies
-
It is to declare that a type conforms to an interface - so you get compile errors if the object fails to implement a method of the interface. // Declare conformity with CanvasObject interface |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Jacalz
-
thank you, I Understood it now |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is to declare that a type conforms to an interface - so you get compile errors if the object fails to implement a method of the interface.
Normally in Fyne code you will see a comment with it like:
// Declare conformity with CanvasObject interface