Keith
You wrote in message news:b9tnvh$lep$
[hidden email]...
> I generated an Interface class for a subclass of IDispatch. Everything
> worked fine. I then changed the inheritance (in the IDL file) to subclass
> IUnknown and regenerated the Interface class (after first deleting the
> original from the image). From this point on the queryInterface method
sent
> to an implementation object of the class randomly returned nil (mostly
nil).
> I couldn't see, from tracing, why this was happening. What seemed to fix
it
> though was to force a recompilation of the supported interfaces method.
When you deleted the original interface class, your #supportedInterfaces
method would have continued to reference that old interface class, and not
the new one you subsequently generated. If you have DPRO its a good idea to
use the Remove Class refactoring, rather than the Delete Class command,
since the former will warn you about any references to the class from
methods in the image. You should, however, be able to simply regenerate the
interface class without deleting it.
Regards
Blair