PRDocuments

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

PRDocuments

keith1y
I am still struggling to work PRDocuments.... I have a layout, I put a
PRDocument in it...

and the code....

document
    ^ self documentOf: self context structure

returns the structure of the PRDocument....

surely it should be

    ^ self documentOf: (PRCurrentContext value structure)

Keith



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Lukas Renggli
> document
>    ^ self documentOf: self context structure
>
> returns the structure of the PRDocument....
>
> surely it should be
>
>    ^ self documentOf: (PRCurrentContext value structure)

That should be exactly the same.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Mariano Martinez Peck


On Mon, Apr 6, 2009 at 12:08 PM, Lukas Renggli <[hidden email]> wrote:
> document
>    ^ self documentOf: self context structure
>
> returns the structure of the PRDocument....
>
> surely it should be
>
>    ^ self documentOf: (PRCurrentContext value structure)

That should be exactly the same.

Sorry, but what are "documents" in Pier ?
 


Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Lukas Renggli
I think Keith is talking about the document widget, the source code he
shows is implemented in PRDocumentWidget part of the Pier-Documents
package. This widget, when added to the environment, provides the
possibility to have different wiki editors at different places on a
single page. This is useful if you for example  want to have a sidebar
with links or additional information.

The PRDocument hierarchy is an part of Pier-Model. It provides an
abstract model of the wiki text and can be traversed to a page as
HTML, Wiki, Plain Text, LaTeX, etc. Normally a Ppage has just one
document, however the PRDocumentWidget allows you to define multiple
documents on a single page.

Lukas

On Mon, Apr 6, 2009 at 4:23 PM, Mariano Martinez Peck
<[hidden email]> wrote:

>
>
> On Mon, Apr 6, 2009 at 12:08 PM, Lukas Renggli <[hidden email]> wrote:
>>
>> > document
>> >    ^ self documentOf: self context structure
>> >
>> > returns the structure of the PRDocument....
>> >
>> > surely it should be
>> >
>> >    ^ self documentOf: (PRCurrentContext value structure)
>>
>> That should be exactly the same.
>
> Sorry, but what are "documents" in Pier ?
>
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>>
>> _______________________________________________
>> SmallWiki, Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Mariano Martinez Peck


On Mon, Apr 6, 2009 at 1:31 PM, Lukas Renggli <[hidden email]> wrote:
I think Keith is talking about the document widget, the source code he
shows is implemented in PRDocumentWidget part of the Pier-Documents
package. This widget, when added to the environment, provides the
possibility to have different wiki editors at different places on a
single page. This is useful if you for example  want to have a sidebar
with links or additional information.

The PRDocument hierarchy is an part of Pier-Model. It provides an
abstract model of the wiki text and can be traversed to a page as
HTML, Wiki, Plain Text, LaTeX, etc. Normally a Ppage has just one
document, however the PRDocumentWidget allows you to define multiple
documents on a single page.

Excellent explanation!!! I was thinking in another thing. Perhaps it is a good idea to add this to "Glossary of terms" of Pier Documentation.

Thanks a lot.

Mariano

 

Lukas

On Mon, Apr 6, 2009 at 4:23 PM, Mariano Martinez Peck
<[hidden email]> wrote:
>
>
> On Mon, Apr 6, 2009 at 12:08 PM, Lukas Renggli <[hidden email]> wrote:
>>
>> > document
>> >    ^ self documentOf: self context structure
>> >
>> > returns the structure of the PRDocument....
>> >
>> > surely it should be
>> >
>> >    ^ self documentOf: (PRCurrentContext value structure)
>>
>> That should be exactly the same.
>
> Sorry, but what are "documents" in Pier ?
>
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>>
>> _______________________________________________
>> SmallWiki, Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Lukas Renggli
> Excellent explanation!!! I was thinking in another thing. Perhaps it is a
> good idea to add this to "Glossary of terms" of Pier Documentation.

Excellent idea. I've added it.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Mariano Martinez Peck


On Mon, Apr 6, 2009 at 2:25 PM, Lukas Renggli <[hidden email]> wrote:
> Excellent explanation!!! I was thinking in another thing. Perhaps it is a
> good idea to add this to "Glossary of terms" of Pier Documentation.

Excellent idea. I've added it.

nice :)
 

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

keith1y
In reply to this post by Lukas Renggli
Lukas Renggli wrote:

>> document
>>    ^ self documentOf: self context structure
>>
>> returns the structure of the PRDocument....
>>
>> surely it should be
>>
>>    ^ self documentOf: (PRCurrentContext value structure)
>>    
>
> That should be exactly the same.
>
> Lukas
>  
*not quite, it inherits

**PRWidget-#context
    ^ context ifNil: [ context := super context ]*


Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

New menu links

keith1y
In reply to this post by Mariano Martinez Peck
I saw a comment about PRMenuWidget being deprecated in favour of

+page|menu+

Are there any further instructions? Is it supposed to be *page|menu* ?

Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: New menu links

keith1y
Keith Hodges wrote:
> I saw a comment about PRMenuWidget being deprecated in favour of
>
> +page|menu+
>
> Are there any further instructions? Is it supposed to be *page|menu* ?
>
> Keith
>  
I misunderstood, I thought that you put |menu on the links, but it goes
on the place you embed the entire page

Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: New menu links

Tudor Girba-3
I am not sure if a misunderstanding is still there, so I will throw in  
my two cents of explanations.

Basically PRMenuWidget behaves like a normal page only that it has  
this special highlighting. So, now instead of requiring a special page  
for this, we allow any page to behave like a menu through the extra "|
menu" parameter.

Cheers,
Doru


On 6 Apr 2009, at 17:50, Keith Hodges wrote:

> Keith Hodges wrote:
>> I saw a comment about PRMenuWidget being deprecated in favour of
>>
>> +page|menu+
>>
>> Are there any further instructions? Is it supposed to be *page|
>> menu* ?
>>
>> Keith
>>
> I misunderstood, I thought that you put |menu on the links, but it  
> goes
> on the place you embed the entire page
>
> Keith
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
www.tudorgirba.com

"There are no old things, there are only old ways of looking at them."




_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

Lukas Renggli
In reply to this post by keith1y
On Mon, Apr 6, 2009 at 5:38 PM, Keith Hodges <[hidden email]> wrote:

> Lukas Renggli wrote:
>>> document
>>>    ^ self documentOf: self context structure
>>>
>>> returns the structure of the PRDocument....
>>>
>>> surely it should be
>>>
>>>    ^ self documentOf: (PRCurrentContext value structure)
>>>
>>
>> That should be exactly the same.
>>
>> Lukas
>>
> *not quite, it inherits
>
> **PRWidget-#context
>    ^ context ifNil: [ context := super context ]*

Normally that cache should be updated through #onChangeContext: by
PRPierFrame>>#update, but of course if there is something wrong in the
#children chain of the PRDocumentWidget then this might not happen. Is
your PRDocumentWidget directly part of the environment, or do you have
something more complicated?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRDocuments

keith1y

>> *not quite, it inherits
>>
>> **PRWidget-#context
>>    ^ context ifNil: [ context := super context ]*
>>    
>
> Normally that cache should be updated through #onChangeContext: by
> PRPierFrame>>#update, but of course if there is something wrong in the
> #children chain of the PRDocumentWidget then this might not happen. Is
> your PRDocumentWidget directly part of the environment, or do you have
> something more complicated?
>  
I do, but I dont think it would effect the children.
> Lukas
>  
Lukas, thanks for your help and insight...

It's behaving itself now.

Lots has changed, so I am not sure how to put my finger on what exactly
it was that fixed it.

Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki