[Zope3-Users] Re: How to make content object return a view?

2006-05-26 Thread Philipp von Weitershausen
David Johnson wrote: > I have a content object, that I want to return a view. How is this > done? It usually isn't. > This situation seems to come up frequently for me. What do you > do? Content objects are usually dull. The only thing they do is store data. If you're using ZODB persistency, t

[Zope3-Users] getUtility outside of the zope.app

2006-05-26 Thread David Pratt
Hi. For the use of interfaces outside of zope.app, does getUtility have any value? Many thanks. Regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users

Re: [Zope3-Users] Re: How to make content object return a view?

2006-05-26 Thread David Johnson
Thanks! You are right. After a re-read of your book last night, I think my problem is that I have not understood or dealt with adapters as of yet. It seems that is the proper solution to expressing content in the way I intended and seems to solve all my problems in this area. -- David

Re: [Zope3-Users] How to make content object return a view?

2006-05-26 Thread Benji York
TAHARA Yusei wrote: You need to use zapi.getMultiAdapter. (this is a alias for zope.component.getMultiAdapter) I suggest not using zapi aliases, use the canonical name for things instead. There is a growing dislike for zapi, and I suspect it will be deprecated in the future. -- Benji York S

[Zope3-Users] Re: getUtility outside of the zope.app

2006-05-26 Thread Philipp von Weitershausen
David Pratt wrote: > Hi. For the use of interfaces outside of zope.app, does getUtility have > any value? Many thanks. I don't understand this question. getUtility finds utilities that have been registered somewhere. It finds them by interface and optionally a name. Where this interface comes from

Re: [Zope3-Users] Reference to a COM object (or other external resource) in a Zope object

2006-05-26 Thread Alek Kowalczyk
Achim Domma napisaƂ(a): [EMAIL PROTECTED] wrote: I am creating a kind of Zope proxy to a 3rd party COM object (I'm accessing it using Pywin32 facilities). I have to store a reference to this object somewhere in my Zope object. But, for obvious reasons, this COM object cannot be serialized so I

[Zope3-Users] Re: getUtility outside of the zope.app

2006-05-26 Thread David Pratt
Hi Philip. Sorry for the oblique question. I am using zope interfaces in a project outside of zope and looking at how I might use some of other bits of zope's functionality. Many thanks. Regards, David Philipp von Weitershausen wrote: > > David Pratt wrote: >> Hi. For the use of interfaces out

Re: [Zope3-Users] There isn't enough context to get URL information.

2006-05-26 Thread Ron Bickers
On Thu May 25 2006 05:50, Achim Domma wrote: > I try to figure out how to make attributes holding content objects > accessible via the browser. I'm working on the same thing, but I don't know how to make a view for the contents of the containers in the ZMI. I have an Item object with 'prices' a

[Zope3-Users] How do I get formlib to play nice with NameChooser

2006-05-26 Thread mats.nordgren
I've been trying to use NameChooser with formlibs AddForm and it always tells me "An empty name was provided. Names cannot be empty." I suspect it has to do with set_before_add as my object comes in to the NameChooser without data. Problem is that you define formlib forms with http://mail.zope.or

Re: [Zope3-Users] How do I get formlib to play nice with NameChooser

2006-05-26 Thread mats.nordgren
Never mind it was a user error on my part. I was stuffing the data variables in the create function into the context not the object being created. Oooops :) On Fri, 26 May 2006 13:02:42 -0500, mats.nordgren wrote > I've been trying to use NameChooser with formlibs AddForm and it > always tells

[Zope3-Users] MultiCheckBoxWidget and formlib

2006-05-26 Thread Mats Nordgren
Could anyone give me a hint on setting up a MultiCheckBoxWidget with formlib? This is what I got: class IMySchema(Interface): multichoice = Set( title=_('Pick one or many'), value_type = Choice(values=['one', 'two', 'three'])) class MyEditForm(form.EditForm): form_fields = form.Fiel

Re: [Zope3-Users] MultiCheckBoxWidget and formlib

2006-05-26 Thread Tom Dossis
Mats Nordgren wrote: > Could anyone give me a hint on setting up a MultiCheckBoxWidget with > formlib? > > > This is what I got: > > class IMySchema(Interface): > multichoice = Set( > title=_('Pick one or many'), > value_type = Choice(values=['one', 'two', 'three'])) > > class MyEditF

[Zope3-Users] Namespace/Viewlets

2006-05-26 Thread David Johnson
I have a viewlet named "cart", which can be displayed with the following TAL code and rendered via : http://mail.zope.org/mailman/listinfo/zope3-users