Re: request for widget library status report

Andrew Kohlsmith <[email protected]> Sun, 20 Apr 2003 10:22:13 -0400
Newsgroups gmane.comp.java.xwt.general
Organization Benshaw Canada
Message-ID <[email protected]>
> > Hell, why not just declare <template> a de-facto alias for CDATA?  I
> > would think that would be by far the most straightforward and
> > idiot-proof way of doing things.

> If you do that, you'll never see the boxes embedded in the template. The
> <box id="box1"/> would be read as were it &lt;box id="box1"/&gt;. That's
> what CDATA does.

Why are you embedding boxes in the template?  If we're going for clarity and 
ease of use (and enforcing no-tabs and line lengths to boot) why not add 
some honest-to-goodness helps-the-programmer-out requirements?

A bigger problem I see is something like the following

<xwt>
    <template>
        can use & and < with impunity
    </template>
    <button>
        _action = function() {  can't use & or < in here, dammit }
    </button>
</xwt>

I suppose CDATA would help here but again, it seems rather nasty.

> CDATA has other problems, though. For example, you can't have ']]>' in
> the text anywhere. Which looks trivial until you find out that
> hard-to-find error traces back to
>    if(idmap[keys[id]]>5) {....}
> Been there, done that.

I can imagine...  that would be a pain in the ass to discover the first 
time.

Regards,
Andrew

_______________________________________________
http://lists.xwt.org/listinfo/dev