IDispatch>>asImplType

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

IDispatch>>asImplType

Steve Alan Waring
Hi Andy and Blair,

Beta 4 looks great, nice work!

I am having one problem with XMLDOM. IDispatch>>asImplType fails to
downCast.

In D4, #asImplType was implemented in IXMLDOMNode, and adding it seems to
fix the problem. In a debugger, ##(self) evaluates correctly to IXMLDOMNode,
but the debugger dissembly shows IDispatch?

Example:
    (IXMLDOMDocument new loadText: '<a/>') firstChild

should be an instance of IXMLDOMElement not IXMLDOMNode.

Thanks!
Steve


Reply | Threaded
Open this post in threaded view
|

Re: IDispatch>>asImplType

Blair McGlashan
"Steve Waring" <[hidden email]> wrote in message
news:[hidden email]...
> Hi Andy and Blair,
>
> Beta 4 looks great, nice work!
>
> I am having one problem with XMLDOM. IDispatch>>asImplType fails to
> downCast.
>
> In D4, #asImplType was implemented in IXMLDOMNode, and adding it seems to
> fix the problem. In a debugger, ##(self) evaluates correctly to
IXMLDOMNode,
> but the debugger dissembly shows IDispatch?
>
> Example:
>     (IXMLDOMDocument new loadText: '<a/>') firstChild
>
> should be an instance of IXMLDOMElement not IXMLDOMNode.

Thanks Steve. This was a result of over appliation of the our 'remove
duplicates' refactoring - I assume that because the RB parser does not parse
##() expressions correctly the parse tree of the two methods was identical
even though the binding of ##(self) is actually different. Anyway it has
been attended to (one can just copy down the IDispatch implementation).

Regards

Blair