PRPage and empty contents

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

PRPage and empty contents

Dominique Dutoit-2
If the text area for the contents is left empty, PRPage>>contents:  
receives a nil object and fails to parse it as a document.

The reason is that the parser can only interpret string objects and  
not nil objects.

PRDocumentParser parse: nil.

The solution could be to assign an empty PRDocument if the value of  
aString is an nil object.

PRPage>>contents: aString
        aString
                ifNil: [ self document: PRDocument new ]
                ifNotNil: [ self document: (self parserClass parse: aString) ].

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRPage and empty contents

Lukas Renggli-2
> If the text area for the contents is left empty, PRPage>>contents:
> receives a nil object and fails to parse it as a document.

Thanks for reporting this problem. I will fix it. ;-)

Cheers,
Lukas

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



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki