Ticket #1498 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

nagare tutorial documentation errors

Reported by: arif Owned by: apoirier
Priority: minor Component: documentation
Version: 0.3.0 Keywords: tutorial
Cc:

Description

In Part 1, the application is registered with
<NAGARE_HOME>/bin/python setup.py develop
and not with
/tmp/tutorial/bin/python setup.py develop

In Part 4, the class Application code should not be:

from counter import Counter

class App(object):

def init(self):

self.counter1 = component.Component(Counter())
self.counter2 = component.Component(Counter())

#
@presentation.render_for(App)
def render(app, h, *args):

h << self.counter1
h << h.hr
h << self.counter2

return h.root

# factory
app = App

but:

from counter import Counter
from nagare import component
from nagare import presentation

class App(object):

def init(self):

self.counter1 = component.Component(Counter())
self.counter2 = component.Component(Counter())

#
@presentation.render_for(App)
def render(app, h, *args):

h << app.counter1
h << h.hr
h << app.counter2
return h.root

# factory
app = App

Change History

comment:1 Changed 7 years ago by apoirier

  • Status changed from new to accepted

comment:2 Changed 7 years ago by arif

In addition, Part 3, re-use components, should really be: Part 4, re-use components.

In Part 4, under 2. Multiview, the indentation of the return statement is wrong. It should read:

@presentation.render_for(Counter, model='freezed')
def render(counter, h, *args):

h << h.h1(counter.val)
return h.root # the indentation on this line is not aligned with the rest of the code

Finally, in the App class, the model used for counter 1 is 'freeze', but it should be 'freezed'.

comment:3 Changed 7 years ago by apoirier

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.