If HeaderOnly derives from AddParser then how can HeaderOnly use the
rendering method of AddParser prior to doing its own rendering?

I want the line `super(HeaderOnly, self).render(h, comp, args)` to work.

class AddParser(object):

    def __init__(self):
        self.name = ''
        self.parser_type = ''

    @property
    def factory(self):
        if self.parser_type == 'HeaderOnly':
            return HeaderOnly(self)

    def build_from(self, o):
        self.name = o.name
        self.parser_type = o.parser_type

@presentation.render_for(AddParser)
def render(self, h, comp, *args):

    h << "Parser Name: " << self.name

class HeaderOnly(AddParser):

    def __init__(self, o):
        self.build_from(o)

@presentation.render_for(HeaderOnly)
def render(self, h, comp, *args):

    super(HeaderOnly, self).render(h, comp, args)

    return h.root

-- 
You received this message because you are subscribed to the Google Groups 
"Nagare users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nagare-users+unsubscr...@googlegroups.com.
To post to this group, send email to nagare-users@googlegroups.com.
Visit this group at http://groups.google.com/group/nagare-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to