On Thursday 2002-09-05 08:59 -0700, Alec Flett wrote:
> http://www.mozilla.org/projects/xpcom/interface-rules.html
Regarding the last point, isn't it considered incorrect to use
|interface| to refer to something that isn't in IDL? (I might be wrong
here.)
Isn't:
%{ C++
class nsIDeviceContext;
%}
[ptr] native nsIDeviceContextPtr(nsIDeviceContext);
the correct way to do things like this? I think this will also require
that the methods using these types are [noscript], which seems good.
Also, it might be good to mention something about minimizing #include
dependencies (good for compile time), especially when the #include is
something that many consumers are not likely to need (e.g., interface
used as a parameter to one method on a large interface). Isn't this
when |interface| is useful? Such as (stealing from
nsIContentViewer.idl, again):
interface nsIDOMDocument;
interface nsIContentViewer : nsISupports
{
/* many methods */
attribute nsIDOMDocument DOMDocument;
/* many more */
};
-David
--
L. David Baron <URL: http://www.people.fas.harvard.edu/~dbaron/ >