WATagBrush subclass ZurbGenericTag ...change tag dynamically?
gettimothy <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Message-ID | <[email protected]> |
Hi all. I am creating the analog of the bootstrap framework for Squeak using the Zurb Foundation framework https://foundation.zurb.com/frameworks-docs.html Its coming along nicely and I am thinking ahead to the refactoring phase... And it would be helpful if I could change the WATagBrush subclass: #ZurbGenericTag instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Zurb-Core-Canvas' the tag method returns: tag ^ 'div' Methods on that, model the bootstrap with lots of beFoo methods that set the class='bar' and others that set the self attributeAt:'funky' put:'town' Here's the issue. For the Accordian thingy, the docs here: https://foundation.zurb.com/sites/docs/accordion.html#basics read in part: The container for an accordion needs the class .accordion, and the attribute data-accordion. Note that in these examples, we use a <ul>, but you can use any element you want. Now, the question. I am subclassing UnorderedList instead of the GenericTag. WAUnorderedListTag subclass: #ZurbAccordianTag instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Zurb-Core-Canvas-Containers' At this stage that means some duplicate "beFoo" methods between the two things. For simplicity reasons, I don't want to re-invent the wheel, but want to keep the example framework (example Browser in bootstrap app) closely aligned to the online documentation. However, if I can dynamically change the tag ^'div' on the ZurbGenericTag to tag ^'ul' then I can centralize those methods in ZurbGenericTag, make ZurbAccordianTag a subclass of it and use the "dynamic change the tag'.... Or...why not just override the method? Good idea? Bad Idea? thx _______________________________________________ seaside mailing list [email protected] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside