Re: [Zope3-Users] Creating utilities overhead
On Tuesday 03 May 2005 09:18, Andreas Jung wrote: > I have an utility registered as > > provides="textindexng.interfaces.ILexicon" > factory="textindexng.lexicon.LexiconFactory" > name="txng.lexicons.default" > > /> > > trying to create a new Lexicon instance through > > lexicon zapi.createObject(None, 'txng.lexicons.default') > > does not work (Zope 2.8, Five) because the factory does not seem > to be registered for IFactory. Right. Because the directive immediately instantiates the utility. > Adding > > provides="zope.component.interfaces.IFactory" > component="textindexng.lexicon.LexionFactory" > name="txng.lexicons.default" > /> > > resolves the issue. But why is the explicit declaration of the factory > necessary? IMO the first declaration implies the second one. So this > looks like configuration overhead to me...thoughts? Well, this is totally different. Here you register a factory called "txng.lexicons.default", not a utility! So getUtility() will not work. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] how to change archetype edit
On Tuesday 03 May 2005 17:56, [EMAIL PROTECTED] wrote: > I know that to change default view for an archetype in plone, you just add > a pt file in skin folder with the lowercase>_view.pt > > now i want to change the edit view for the archetype but i can not find > anything like that i tried _edit.pt > _edit_form.pt but nothing seems to be working..plone picks > up base_edit everytime it opens the archetype in edit mode.. Wrong List. This is Zope 3 help only. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Using metadata for description
On Thu, May 05, 2005 at 04:38:00PM +0200, Florian Lindner wrote: | Am Mittwoch, 4. Mai 2005 08:40 schrieb Philipp von Weitershausen: | > Florian Lindner wrote: | > > Hello, | > > | > > I want to allow the user to give items a short description, like for a | > > link: | > > | > > Name: Zope | > > URL: http://zope.org | > > Description: Homepage of Zope, a web application server | > > | > > Is it wise to use the metadata description field for that purpose or | > > should I just add a TextLine attribute to the interface. | > | > If this "description" has little or nothing to do with the actual item, | > but is only there for categorizing it or similar, I'd use the DublinCore | > 'description' field. | | Mmmhh, not easy to tell... ;-) | How would you solve the case above? The user just uses it to describe it, The | application itself makes no use of it. I would lean towards Dublin Core for that. It isn't actually part of the data, if the application doesn't use it. It's more like an extension, which is what adapters are for. -D -- There is not a righteous man on earth who does what is right and never sins. Ecclesiastes 7:20 www: http://dman13.dyndns.org/~dman/jabber: [EMAIL PROTECTED] signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Using metadata for description
Am Mittwoch, 4. Mai 2005 08:40 schrieb Philipp von Weitershausen: > Florian Lindner wrote: > > Hello, > > > > I want to allow the user to give items a short description, like for a > > link: > > > > Name: Zope > > URL: http://zope.org > > Description: Homepage of Zope, a web application server > > > > Is it wise to use the metadata description field for that purpose or > > should I just add a TextLine attribute to the interface. > > If this "description" has little or nothing to do with the actual item, > but is only there for categorizing it or similar, I'd use the DublinCore > 'description' field. Mmmhh, not easy to tell... ;-) How would you solve the case above? The user just uses it to describe it, The application itself makes no use of it. Florian > > > If it's good to use metadata: How can I directly use metadata from ZPTs? > > Through the 'zope' TALES namespace, e.g. obj/zope:description. Not all > DublinCore metadata is available through that, though. See > zope.tales.interfaces.ITALESFunctionNamespace for a list of available > names. > > Philipp > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] schema interface field validation
On May 5, 2005, at 3:16 AM, Alen Stanisic wrote: Hi, could I reference other fields inside the schema interface to, for example, default one field based on the value entered in one of the previous fields, or to set 'required' attribute based on previous fields entered One way (the "approved" way) to do this is almost ready. Part of the vision of fields is that they may only validate within themselves. Interfaces are the way to make statements about groups of fields. You may make statements about interactions of fields with invariants: see zope/interface/README.txt and look for the word 'invariant'. What we don't have yet is form machinery that checks invariants and displays the errors. This is working in our local code and will be part of Zope 3.2. Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] schema interface field validation
On Thursday 05 May 2005 03:16, Alen Stanisic wrote: > could I reference other fields inside the schema interface to, for > example, > default one field based on the value entered in one of the previous > fields, > or to set 'required' attribute based on previous fields entered No, you can't. It is one of the features that has not been implemented yet. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] schema interface field validation
Hi, could I reference other fields inside the schema interface to, for example, default one field based on the value entered in one of the previous fields, or to set 'required' attribute based on previous fields entered for example if I had field1 = TextLine( title = _("Field1"), description = _(u"Field1") required = "False") field2 = TextLine( title = _("Field2"), description = _(u"Field2") required = ) and field2 is only required if field1 has not been entered, or should this be handled elsewhere, maybe Views or Vocabularies. Thanks Alen ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users