App instance attribute not eagerly created

11 views
Skip to first unread message

Terrence Brannon

unread,
Apr 10, 2015, 7:44:07 PM4/10/15
to nagare...@googlegroups.com
I am trying to execute some old code verbatim:
https://groups.google.com/forum/#!topic/nagare-users/4MjMHdL8mbg

However, in `class App` the attribute editor_component is not eagerly created. This leads to the presentation layer failing on the line `h << self.editor_component`

I would appreciate any help in getting this source code to run. I know it has some issues functioning. But I first want to get the code working as-is:
https://gist.github.com/metaperl/2f6d088dd9a718e305df





apoirier

unread,
Apr 11, 2015, 12:52:37 PM4/11/15
to nagare...@googlegroups.com
Hi Terrence,


Le vendredi 10 avril 2015 19:44:07 UTC-4, Terrence Brannon a écrit :
I am trying to execute some old code verbatim:
https://groups.google.com/forum/#!topic/nagare-users/4MjMHdL8mbg

However, in `class App` the attribute editor_component is not eagerly created. This leads to the presentation layer failing on the line `h << self.editor_component`

The 'editor_component' is created right. And then Nagare tries to rendered it. The problem comes from the rendering function for the 'OptionEditor' component : the line #35 'return h.root' is indented so that this function only return a DOM tree if the condition at #28 is 'True'. Currently the condition is evaluated to 'False' so Python returns the implicit default 'None' value which is the problem.
 
I would appreciate any help in getting this source code to run.


I know it has some issues functioning.

Right. The comment https://groups.google.com/forum/#!topic/nagare-users/4MjMHdL8mbg explains why the condition line #28 is always evaluated to 'False'
 
But I first want to get the code working as-is:
https://gist.github.com/metaperl/2f6d088dd9a718e305df

Best regards,
Alain 
Reply all
Reply to author
Forward
0 new messages