Reputation: 1358
I just upgraded a PB9 app to PB12 Classic. Ran fine, so far.
Then I tried to migrate the PB12 Classic app to PB12.NET. When I tried to run it, it popped up the following error while compiling:
Event ('ue_retrieve') cannot be overloaded: Derived event has different return type(long) with base event(void).
Googling "derived event has different return type" was notably unhelpful. Does anybody have any thoughts on why this would be fine in 9 and 12 Classic, but not 12.NET?
ETA: PowerBuilder 12.6, if it's relevant.
ETA2: I checked back to the original definition of the event, and as you could expect, it didn't have a defined return type. I defined it as "long", and promptly got a bunch of error messages from other events that returned "void".
Upvotes: 0
Views: 241
Reputation: 4174
The problem is that PB 12.6 doesn't support event overloading. For that matter I didn't think that you could overload events in any version of PB (functions yes) so maybe it wasn't enforced as strongly in older versions.
Not to be confused with overriding/inheriting events which is fine.
It sounds like the only difference is return type so maybe the older version of PB allowed this and now they can't allow it because of .NET, hence the no compile issue.
Generally speaking if you want to overload use functions (in PowerBuilder) hope this helps.
Upvotes: 1