Bloggs.Fred
2006-10-02 19:11:45 UTC
We've got a relatively large OCX that's been evolving over quite a long
time. Just recently, VB has decided that it no longer wants to compile
with Binary Compatibility set and reports a rather improbable error
along these lines:
'flags' in the 'CtlFlags' class module has arguments and/or a return
type that is incompatible with a similar declaration in the
version-compatible component.
Original definition:
Public flags As Object
Current definition:
Public flags As FlagsSelect
I say improbable because, since the dawn of time, flags has always been
public and always of type FlagsSelect.
the declaration as it is, break compatability and move on.
Trying the latter option first, we switched off compatibility,
generated an OCX, copied that into the compatibility directory, and
switched compatibility back on selecting the fresh OCX. Problem is, VB
just spits out exactly the same complaint.
The only way we've found to get a binary built without VB complaining
is to alter the declaration to "Public flags As Object". It's almost
as if VB is sticking its head in the sand and saying that even though
it knows its error message is a lie, it's going to make it a truth by
having you change your code anyway!
Anyone got any clues as to what this is all about? Will it ever be
possible to build the source code as it was or do we have to play along
with VB? Why do I have visions of HAL9000 running through my head?
time. Just recently, VB has decided that it no longer wants to compile
with Binary Compatibility set and reports a rather improbable error
along these lines:
'flags' in the 'CtlFlags' class module has arguments and/or a return
type that is incompatible with a similar declaration in the
version-compatible component.
Original definition:
Public flags As Object
Current definition:
Public flags As FlagsSelect
I say improbable because, since the dawn of time, flags has always been
public and always of type FlagsSelect.
From here there are two possible options available: change the
declaration to fit in with VB's confused view of the universe or keepthe declaration as it is, break compatability and move on.
Trying the latter option first, we switched off compatibility,
generated an OCX, copied that into the compatibility directory, and
switched compatibility back on selecting the fresh OCX. Problem is, VB
just spits out exactly the same complaint.
The only way we've found to get a binary built without VB complaining
is to alter the declaration to "Public flags As Object". It's almost
as if VB is sticking its head in the sand and saying that even though
it knows its error message is a lie, it's going to make it a truth by
having you change your code anyway!
Anyone got any clues as to what this is all about? Will it ever be
possible to build the source code as it was or do we have to play along
with VB? Why do I have visions of HAL9000 running through my head?