[BLACKBOX] foreign COM-objects part 2: inherit multiple interfaces

From: VDI <bernhardt.gunnar{([at]})nowhere.xy>
Date: Fri, 17 Dec 2010 09:36:26 +0100

----boundary-LibPST-iamunique-593318031_-_-
Content-type: text/plain

Dear all,

one thing I found to be quite confusing when trying to use MSXML from
 BB:

In principle you should be able to create a new xmlElement and append
 it to any kind of xmlNode, because IXMLDOMElement is derived from
 IXMLDOMNode.

TYPE
  IXMLDOMNode* = POINTER TO INTERFACE RECORD
                 END;
  IXMLDOMElement* = POINTER TO INTERFACE RECORD (ANYPTR + IXMLDOMNode)
                    END;
PROCEDURE (this:IXMLDocument) createElement*( <omitted> ) :
 IXMLElement,NEW,ABSTRACT;
PROCEDURE (this:IXMLDOMNode) appendChild*(p0 : IXMLDOMNode) :
 IXMLDOMNode,NEW,ABSTRACT;

Above code is taken from the gpcp interface module.


The code generated by (Dev)ComInterfaceGen looks like this:
TYPE
                IXMLDOMDocument = POINTER TO RECORD (CtlT.Object)
                        (this: IXMLDOMDocument) createElement (tagName: ARRAY OF CHAR):
 IXMLDOMElement, NEW;
                END;
                IXMLDOMNode = POINTER TO RECORD (CtlT.Object)
                        (this: IXMLDOMNode) appendChild (newChild: IXMLDOMNode):
 IXMLDOMNode, NEW;
                END;
                IXMLDOMElement = POINTER TO RECORD (CtlT.Object)
                        <omitted>
                END;
 
Am I correct that the reason is that Component Pascal as it is defined
 in the Language Report (by Oberon) does not allow to inherit from
 multiple interfaces so there is not easy way to circumvent this?
                
kind regards
gunnar


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-593318031_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ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3J0IChieSBPYmVyb24pIGRvZXMgbm90IGFsbG93IHRv
IGluaGVyaXQgZnJvbVxwYXINCiBtdWx0aXBsZSBpbnRlcmZhY2VzIHNvIHRoZXJlIGlzIG5vdCBl
YXN5IHdheSB0byBjaXJjdW12ZW50IHRoaXM/XHBhcg0KXHRhYiBcdGFiIFxwYXINCmtpbmQgcmVn
YXJkc1xwYXINCmd1bm5hclxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmli
ZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VS
VkBMSVNUUy5PQkVST04uQ0h9fQBCRVJP
----boundary-LibPST-iamunique-593318031_-_---
Received on Fri Dec 17 2010 - 09:36:26 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:27 UTC