Re: How can I extend with new attributes
Frank Meissner <[email protected]> Tue, 14 Sep 2004 21:34:14 +0200
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
Kovári László wrote: > Hi Bharat, > > Thank you your example. > > As I see in this case I must inherit from the base "class"(JButton in > your example) one own "class"(CustomButton). eg. > If I want to extend all > visible controls (visible tag in swixML terminology) with one attribute > it is a little difficult. Kovári, swixml tries to find a public available "setXyz" method of the "tag-class" if you mention the tag "xyz" in your xml source. There is no difference where this method is defined, in the tag-class itself, its super-class, or a super-class in any hirarchy level up there. So, if you want to have 10 attributes of your custom component, you have to implement 10 functions named setDesiredTagName1(...) to setDesiredTagName10(...) in your tag-class. But perhaps I did misunderstand you, your description of "visible controls" (what is that?) and "visible tag in swixML terminology" (I never heard of it and it sounds terrible wrong). Try to read and understand the examples provided. Try to describe your problem with some code snippets. http://www.catb.org/~esr/faqs/smart-questions.html