Extending Swixml with new tags...
Steven F. Toth <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
It's really easy to add new tags to swixml, but what about new attributes to the parser. So far I've had to put custom code into the parser step, what about adding an interface to the parser so that developers can add their own custom attribute tags into the parser without having to either extend it or recompile it themselves. Even though it's easy to do so, I don't think that recompiling it should be necessary. Another idea I had was that any tag should be able to rip a variable in the way that actions are handled now. Right now, when you declare an action attribute on a tab, the parser goes to the client object and looks for a public Action variable. Why can this not be extended to anything such that if there is a variable on the client object called X, then the parse will use that to set the value of the attribute (trying to convert to the proper type maybe too ). so if you say <label color="myLabelColor" /> the parser would try to use the value of the client object's member variable's, then try to parse the color value in the normal way? Steve