It defaults to "null", because of this line (l. 411 in "base/basegrid.lzx").

initArgs.needsSetRegularColor = this.bgcolor0 != null || this.bgcolor1 != null;

If you change it to something else, this test must still pass. So, "white" won't be working, maybe to left it blank does work, but I haven't tested it so far (e.g. I don't know whether there is a compiler default value for attributes of type "color".)


On 6/23/2008 10:36 PM, Donald Anderson wrote:
Should these be "white"?  Or just left blank?

On Jun 23, 2008, at 4:09 PM, André Bargull wrote:

If you are using:
<attribute name="bgcolor1" type="color" value="null" />
you'll get:
constraint_when.lzx:5:64: *invalid color: null*

Somehow obvious, because "bgcolor1" is of type "color" and there is no color named "null".


[cc-ing laszlo-dev to share these oral traditions]

`value="$x{y}"` is shorthand for `value="x" when="y"`, so I would say the doc tool needs to know how to parse both.

OTOH `$immediately{null}` is exactly the same as `null`; i.e., the default value for `when` is immediately.

Oh and, `${y}` is shorthand for `$always{y}`, because that is the most common reason for a when other than immediately.

The simple work-around for now would appear to be to remove the (useles) constraint from the source.

On 2008-06-23, at 15:27 EDT, Donald Anderson wrote:

> Hey, I noticed you three were the last that touched this, maybe you > know....
>
> <basegrid> has a couple attributes:
>
> <attribute name="bgcolor0" type="color" > value="$immediately{null}"/> > <attribute name="bgcolor1" type="color" > value="$immediately{null}"/>
>
> $immediately{null} means nothing to the doctools, and it shows as > just that.
> I noticed basetabs.lzx has:
>
> <attribute name="inset_top" value="8" type="number" > when="immediately" />
>
> So maybe when="immediately" is meant?
>
> This code has been in basegrid.lzx since r726 when it was imported > from perforce.
> Thanks,
>
> - Don
>
>
> --
>
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
>
> voice: 617-547-7881
> email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> www: http://www.ddanderson.com
>
>
>



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
www: http://www.ddanderson.com <http://www.ddanderson.com/>



Reply via email to