Gervase Markham wrote:
> > interface nsIFoo : nsISupports {
> > long getLength();
> > void setLength(in long length);
> > long getColor();
> > };
>
> Would these not need to be GetLength and SetLength to be the same as the
> below? Or will either do?
Either will do for the C++ bindings, which capitalize, but Mozilla IDL
style is interCaps (not InterCaps), so you should not capitalize IDL
attribute or method names -- doing so makes JS, Java, etc. binding style
suck, without any workaround.
> > The code below will generate the exact same C++ signature, but is more
> > script-friendly.
> >
> > interface nsIFoo : nsISupports {
> > attribute long length;
> > readonly attribute long color;
> > };
>
> (I was in some code yesterday that used initial caps for these, and it
> worked...)
Bad IDL style, bug someone.
/be