Hi hannes "Ideally we should add the pillar element to the associated morphic to manage back link from the renderer to the pillar tree. But this is to be done." I meant that rendering is just one part of the story, that in the future you will want to click on the morph and - jump to the code - edit in place so in that case this is important to be able to have a pointer to the Pillar model.
I remember I did not like the PRMorphWriter because it has a lot of assumption of the output. Now we did the two in one afternoon to show to maxim that we could do it fast instead of explaining it. So you can consider that this is was just a trial showing the way but I would not be surprised that we should throw away what we did. I think that in each visitor action somehow we should a call (may be via a super call) to aMorph setPillarElement: anElement Stef On Fri, Aug 25, 2017 at 10:11 PM, H. Hirzel <hannes.hir...@gmail.com> wrote: > On 8/25/17, H. Hirzel <hannes.hir...@gmail.com> wrote: >> The package contains two approaches to render a Pillar document object >> to Morphic. >> >> 1. PRVisitor subclass: #PRMorphWriter >> 2. PRDocumentWriter subclass: #PRMorphWriter2 >> > After removing PRMorphWriter we have what the screen shot shows. > > PRMorphWriter2 using PRMorphCanvas does the job. > > PRMorphInterface is a demo class and PRRenderingExamples contains some > demo Pillar source code. > > > Stephane, you wrote > > "Ideally we should add the pillar element to the associated morphic to > manage back link from the renderer to the pillar tree. > But this is to be done." > > I do not understand what you mean with this. > > It sound like there > should there be a link from the morph used in rendering to the Pillar > document object model node? > > The way how it is implemented at the moment is different. > > An instance of the class Text is created. > > parseButton action: [ > document := PRPillarParser new parse: textInput text. > morphWriter start: document. > textResult text: morphWriter text ]. > > Then it seems that just a TextMorph is displayed > > writer text asMorph openInWindow. > > And what is the reason for this? > > --Hannes