W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2009

Re: [WebIDL] Default Values for Arguments

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 24 Nov 2009 11:52:35 +0000 (UTC)
To: Steffen Krüssel <steffen.kruessel@googlemail.com>
Cc: Simon Pieters <simonp@opera.com>, public-script-coord@w3.org
Message-ID: <Pine.LNX.4.62.0911241151150.9450@hixie.dreamhostps.com>
On Fri, 13 Nov 2009, Steffen Krüssel wrote:
> 2009/11/13 Simon Pieters <simonp@opera.com>
> >
> > I think you want something like:
> >
> >   interface textbox {
> >     void setText(in DOMString text, in optional unsigned long long color);
> >   }
> >
> >   When the color argument is omitted, the default value of black/0 must
> >   be used.
> 
> I don't think that the "optional" attribute is sufficient as this does not
> (formally) specifies what is being implicitly done in that case (i.e. using
> a default value).

It's not just "optional", it's also the text after the interface, saying 
what the requirements on the implementations are.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 24 November 2009 11:53:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:02 UTC