Re: Phix syntax
- Posted by irv Dec 19, 2020
- 929 views
It doesn't, you've found a bug (thanks).
If you declare a second name field, as expected you get a "duplicate" compilation error.
However all methods are "virtual", in the sense that they can be overidden.
If your base Widget class has a set_name() procedure, and your Window class also has one, it quietly replaces it.
PS. I'm committed to this idea now, but with no timescale as yet.
Great, understood. It appears that I can mostly automate the process of converting the EuGTK "dispatch table" into classes. Maybe it won't be as painful as I first thought.
I tried a few tests with the universal "set" procedure as used in EuGTK, but it won't work since the class routines don't have routine-ids. Still possible to test using the existing syntax for calls, however.