RE: [Zope] Not able to render a base class...

2000-09-08 Thread R. David Murray

On Fri, 8 Sep 2000, Brian Withun wrote:
> I was rather expecting to see 'Renderable' as an option in the BASE CLASSES,
> but it's not there.  If it's supposed to be there, can you fathom what I may
> have done wrong?

You need to install the Renderable product.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] Not able to render a base class...

2000-09-08 Thread Brian Withun



| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kapil
| Thangavelu
| Sent: Tuesday, September 05, 2000 12:11 PM
| To: Brian Withun
| Cc: Zope mailing list
| Subject: Re: [Zope] Not able to render a base class...
|
|
| Brian Withun wrote:
| >
| > = :PREFACE: =
| >
| > I have placed the __init.py__ and Renderable.py into
| > .\lib\python\Products\Renderable and have restarted Zope
| (necessary?  ..I'm
| > too used to windows ;-)
| >
| > I made a trivial little Folderish ZClass and am trying to get
| it to render
| > itself...
| >
| > I've defined a 'view' tab that represents the ZClass, and it works as
| > expected, with 'View' being bound to an 'index_html' method of
| my folderish
| > ZClass.
| >
| > I've added one of these ZClasses to a development folder.
| >
| > The development folder also contains a dtml document named
| 'index_html' as
| > follows:
| >
| > 
| > 
| > 
| > This is the  Document.
| > 
| > 
| > 
| >
| > 'test' is my product
| > 'testclass' is my ZClass (in the product 'test')
| > 'trial' is my development folder
| > 'one' is the ZClass instance in the 'trial' folder
| > 'Tropical' is an image id in the ZClass
| >
| > = :PROBLEM: =
| >
| > Why does 'trial/index_html' render this:
| >
| > 
| > 
| > index_html
| > 
| > This is the index_html Document.
| > 
| > 
| > 
| >
| > ..and how do I turn '' into a
| rendering of
| > the ZClass instance ?
|
|
| Make sure your zclass inherits from Renderable
| make a dtml method called render in your zclass
| adjust render to display the zclass as you wish
|
|
| Kapil
|

Okay, I can make these changes, but when you say 'Make sure your zclass
inherits from Renderable,' how do I do that?

Should I see 'Renderable' as one of the BASE CLASSES available when I am
creating a zclass, or can I somehow modify an existing zclass to
all-of-a-sudden inherit from Renderable (and how would one do that??)

I was rather expecting to see 'Renderable' as an option in the BASE CLASSES,
but it's not there.  If it's supposed to be there, can you fathom what I may
have done wrong?


Brian Withun


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Not able to render a base class...

2000-09-05 Thread Kapil Thangavelu

Brian Withun wrote:
> 
> = :PREFACE: =
> 
> I have placed the __init.py__ and Renderable.py into
> .\lib\python\Products\Renderable and have restarted Zope (necessary?  ..I'm
> too used to windows ;-)
> 
> I made a trivial little Folderish ZClass and am trying to get it to render
> itself...
> 
> I've defined a 'view' tab that represents the ZClass, and it works as
> expected, with 'View' being bound to an 'index_html' method of my folderish
> ZClass.
> 
> I've added one of these ZClasses to a development folder.
> 
> The development folder also contains a dtml document named 'index_html' as
> follows:
> 
> 
> 
> 
> This is the  Document.
> 
> 
> 
> 
> 'test' is my product
> 'testclass' is my ZClass (in the product 'test')
> 'trial' is my development folder
> 'one' is the ZClass instance in the 'trial' folder
> 'Tropical' is an image id in the ZClass
> 
> = :PROBLEM: =
> 
> Why does 'trial/index_html' render this:
> 
> 
> 
> index_html
> 
> This is the index_html Document.
> 
> 
> 
> 
> ..and how do I turn '' into a rendering of
> the ZClass instance ?


Make sure your zclass inherits from Renderable
make a dtml method called render in your zclass 
adjust render to display the zclass as you wish


Kapil

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )