On Fri, 2004-10-08 at 12:06 +1000, Dominic Cioccarelli wrote:
> XML (and HTML) are document mark up languages. They perform a this task very 
> well but are completely inappropriate as scripting languages. XUL isn't the 
> only perpetrator in this regard, another classic example of an inappropriate 
> use of XML is in ant build scripts.

I can only really offer evidence from Vexi, but I'm certain that XUL is
in a similar position.

The XML and (Vexi's version of) JavaScript compliment each other:

<button id="b" text="A button!" />
<textfield id="t" text="Not pressed the button yet" />

var c=1;

$b.action ++= function(v) {
    $t.text = "He pressed the button " + c + " time" + (c++>1:"s!":"");
}

I expect it is not too dissimilar, if more verbose, in XUL.
-- 
- Charlie

Charles Goodwin <[EMAIL PROTECTED]>
Online @ http://charlie.vexico.com



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
xul-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xul-talk

Reply via email to