[luxor-xul-develop] Re: Possible method for extending XUL tag set in Luxor
Status: Beta
Brought to you by:
vamp201
From: Gerald B. <ge...@va...> - 2002-08-30 19:46:41
|
Hi, Looks great. I had something similar in mind to make it easier to add new xul tags (something along the lines of new ant tasks). > It's just a quick hack, and it might be better to > use an xml file format where the content can be > extended eg: > <xul-tag name="button" > node="luxor.core.input.ButtonDef" /> I guess the best way is to follow the Ant model, that is, use java properties for built-in tags and allow xml tags in arbitrary xul docs for custom tags (similar to ant's taskdef). > One benefit here is that the set of tags can be > extended, especially if > the 'discovery' mechanism searches for these tag > mapping files on the class > path. Allowing easy extensibility with your own tags is a major priority and I will add it as soon as possible. Great stuff, keep it up. > I would prefer to have a separate class to deal with > this mapping (XulNodeMap?) and let XulLoader deal > with it via an interface. The > implementation of the interface could be decided > from a config file > which would make the thing pluggable (Swing/SWT?) Having a XulNodeMapper/XulNodeMap/XulTagMapper or however you name it makes definitely sense. I disagree with plugable Swing/SWT config files. I rather have two different distros/packages to keep the messy internals easy to maintain without having to know more than one toolkit (along the line of the SWT architecture in constrast to AWT disaster). However, this doesn't exclude a common core for both toolkits. I don't see a need to switch toolkits (SWT/Swing) at runtime. It also bloats the distro and gets out of hand once you add another toolkit such as Gtk.Java or Qt.Java or whatever. - Gerald |