[Zope] Confera "talkback" buttons - is this correct?

Alexander Staubo alex@mop.no
Wed, 14 Jul 1999 01:02:16 +0200


Of course. Call it a momentarily lapse of reason -- I wasn't thinking
clearly. Honestly! :-)

I remember being somewhat annoyed by this at one point as I could not
find a way to cleanly handle class construction -- I ended up putting a
check in the class' index_html and creating my instances there, which is
an ugly but functional hack. I still think ZClasses should be permitted
to expose constructor-like methods. The form-handling code you described
works but is hardly a "neat" solution.

--
Alexander Staubo             http://www.mop.no/~alex/
"He could open a tin of sardines with his teeth, strike a Swan Vestas
on his chin, rope steers, drive a steam locomotive and hum all the
works of Gilbert and Sullivan without becoming confused or breaking
down in tears."
--Robert Rankin, _The Book of Ultimate Truths_

>-----Original Message-----
>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
>Behalf Of Brian
>Lloyd
>Sent: 14. juli 1999 00:55
>To: 'Alexander Staubo'; Zope Mailing List (E-mail)
>Subject: RE: [Zope] Confera "talkback" buttons - is this correct?
>
>
>> Speaking of which, has anybody tried using Confera from
>> within a ZClass?
>> It would be much more elegant that was Cees describes.
>Question being:
>> Would Confera store its messages in the instance, or in the class?
>>
>> --
>> Alexander Staubo
>
>You would need to arrange for your ZClass to create a new
>Confera _instance_ in your new object instance at construction
>time. If you plopped a Confera instance into the actual ZClass,
>that Confera instance would be shared by all instances of that
>ZClass - this would be the case for _all_ mutable objects,
>exactly like in python.
>
>For example, to create an object where each instance has its
>own list attribute (mutable object) in Python, you would do:
>
>class foo:
>  def __init__(self):
>    self.data=[]
>
>You would _not_ do:
>
>class foo:
>  data=[]
>
>...because all foo instances would share the same data list.
>
>Hope this helps!
>
>
>Brian Lloyd        brian@digicool.com
>Software Engineer  540.371.6909
>Digital Creations  http://www.digicool.com
>
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(For developer-specific issues, use the companion list,
>zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>