Hi,
I'm trying to understand how Pier works, especially rendering content. I found that PRDocumentParser is responsible to parse Pier syntax. I want a simple way to render the structure, looks like PRDocumentWidget plays a role here. I don't catch the context stuff.
For example, how can I render: PRDocumentParser parse: '!Hello World' in a WAComponent subclass ? Is there a page, paper, doc. I should read because Google seems powerless here, and Pier is quite large for my tiny mind at night :)
Cheers,
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
laurent laffont wrote:
> Hi, > > I'm trying to understand how Pier works, especially rendering content. Here's the rough understanding that I have. - the content is held in instances of PRStructure subclasses - PRPage is the most important subclass, with regard to wiki content - the wiki syntax that a user submits, is parsed into real objects (i.e. a parse tree), and these parse tree objects are from the PRDocumentItem hierarchy - each PRPage holds the parse tree for a page of content - if you inspect/explore the class variable named "instances" of the PRKernel class, you will see the content/pages/parse-trees - to display content, the parse tree is traversed by an appropriate subclass of PRVisitor - in the case of displaying content via Seaside, the important class to look at is PRViewRenderer. This visitor traverses the page/document parse tree, and during the traversal, invokes Seaside rendering code which results in the appropriate HTML being emitted. Hope that helps to get you started. -- Yanni _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Yanni Chiu <yanni <at> rogers.com> writes:
> .... Your description is really helpful. You are describing an instance of the use of the Visitor pattern. Sweet _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Yanni Chiu
Thank you Yanni. I've added these infos to the Pier-Help package and others I've found... Cheers, Laurent Laffont http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/ On Wed, Sep 1, 2010 at 1:11 AM, Yanni Chiu <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |