David Bradley wrote:
> 
> Per Winkvist wrote:
> >     service->evictEntries (1); /* 1 == STORE_IN_MEMORY */
> 
> Change to service->EvictEntries (1);
> 
> In JS, the first character is changed to lower case to keep with JS
> conventions.

I agree with David's solution. His explanation is a little off
though. Just for the record... We encourage people to use leading
lowercase for methods and attribute declarations in idl. The
xpidl compiler converts these to uppercase for the C++ headers to
match our C++ case convention. JS and other language mappings
that use the generated type libraries match whatever case was in
the original idl declaration. This scheme lets up match both the
C++ and JS case conventions. It was controversial at the time.
But that's what we did.

Also, please use nsICache::STORE_IN_MEMORY rather than a magic
number in your C++ code. I know this was just a sample, but also
please check 'service' for null before using it.

John.

Reply via email to