Re: [Zope-dev] Internationalization

2001-01-05 Thread Federico Di Gregorio
On Thu, Jan 04, 2001 at 12:02:17PM -0700, [EMAIL PROTECTED] wrote: Hello, Has anyone translated a site within Zope ? I have tried the ZBabel Translation System (http://www.zope.org/Members/TheJester/ZBabel) and didn't think it did really what I was after. I need to translate the site

Re: [Zope-dev] Product dev

2001-01-05 Thread Chris Withers
Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't register, complain! import

Re: [Zope-dev] case insensitive sorts

2001-01-05 Thread Chris Withers
Shane Hathaway wrote: Shane Hathaway wrote: def sort_strings(data): sortable_data = list(map(lambda s: (lower(s), s), data)) sortable_data.sort() return map(lambda s: s[1], sortable_data) ... Or better, you could pass a comparison function to sort() like Tres suggested. :-)

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Martijn Pieters
On Thu, Jan 04, 2001 at 10:46:35AM +, Chris Withers wrote: Dieter Maurer wrote: acquisition.donotacquire('index_html') This would be great. Indeed :-) class MyClass (Acquisition.Explicit): acquisition = ClassAcquisitionInfo()

Re: [Zope-dev] CatalogAware

2001-01-05 Thread Chris Withers
Michael Bernstein wrote: Your example is correct as far as it goes, but as I understand it, you are not really specifying the default catalog per se, but the default catalog *name*. snip This is true, and one of the reasons why I (and maybe only I ;-) consider CatalogAware somewhat less

Re: [Zope-dev] CatalogAware

2001-01-05 Thread Chris Withers
Michael Bernstein wrote: Aha! You're saying that catalog_object and uncatalog_object are methods of the catalog, so when the catalog contains the objects directly, it's all that's neccessary, correct? Yes :-) uncatalog_object to be called on it (I'm not sure what method reindex_object

Re: [Zope-dev] RE: objectIds accessiblilty and a proposal

2001-01-05 Thread Chris Withers
Brian Lloyd wrote: Are you talking about 'ProtocolAccessibility'? It's still there (though Jim has done some rearranging of things there lately)... http://www.zope.org//Wikis/DevSite/Proposals/ProtocolAccessibility So it is :-) Comments are still welcome... Chris

[Zope-dev] ComputedAttribute

2001-01-05 Thread Chris Withers
Martijn Pieters wrote: You could use ComputedAttribute for that: class MyClass(Acquisition.Explicit): # The following attribute is acquired transparently def _acquired_your_attribute(self): return self.aq_acquire('your_attribute') your_attribute =

[Zope-dev] Re: ComputedAttribute

2001-01-05 Thread Martijn Pieters
On Fri, Jan 05, 2001 at 12:22:32PM +, Chris Withers wrote: Martijn Pieters wrote: You could use ComputedAttribute for that: class MyClass(Acquisition.Explicit): # The following attribute is acquired transparently def _acquired_your_attribute(self): return

Re: [Zope-dev] Developers Reference

2001-01-05 Thread Chris Withers
Anyone know if there are plans for a second O'Reilly book to cover development stuff like this? . o O ( Zope: The Definitive Developers Reference ) Ah, I guess I can only dream for now :-) cheers, Chris Martijn Pieters wrote: On Fri, Jan 05, 2001 at 12:22:32PM +, Chris Withers wrote:

[Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

2001-01-05 Thread Steve Alexander
This is an RFE for Zope 2.3. I'm posting it here for discussion, rather than in the Collector. In the new PythonScripts product (that is a standard part of Zope 2.3) there is a standard utility module that can be imported into a Python Script with import Products.PythonScripts.standard

Re: [Zope-dev] protocol accesibility

2001-01-05 Thread Chris Withers
Toby Dickenson wrote: On Fri, 05 Jan 2001 12:18:07 +, Chris Withers [EMAIL PROTECTED] wrote: http://www.zope.org//Wikis/DevSite/Proposals/ProtocolAccessibility So it is :-) Comments are still welcome... Comments provided as requested With sensible defaults, what I was

Re: [Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

2001-01-05 Thread Chris Withers
Steve Alexander wrote: snip standard stuff These functions would be really useful as part of the DTML _ namespace variable. I sometimes find myself wanting to use html_quote in a DTML expression. If you have something like that, wouldn't it be better, more readable, etc, for it to be moved

Re: [Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

2001-01-05 Thread Steve Alexander
Steve Alexander wrote: The PythonScripts product could add these functions to the _ namespace variable at product init time, so there would be no need to change the DocumentTemplate modules. And here's a patch: Just add these lines at the end of

Re: [Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

2001-01-05 Thread Steve Alexander
Chris Withers wrote: If you have something like that, wouldn't it be better, more readable, etc, for it to be moved intop a python script, even if that script was only 1 line long? eg: dtml-if "mysomething(_['title_or_id'],_.standard.html_quote(absolute_url()+_[id]))" You are being

Re: [Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

2001-01-05 Thread Chris Withers
Steve Alexander wrote: eg: dtml-if "mysomething(_['title_or_id'],_.standard.html_quote(absolute_url()+_[id]))" You are being deliberately Byzantine there! I provided a good example for my case, don't know what Byzantine means, erk :-S However, I agree with you in principle. I've

Re: [Zope-dev] ZPatterns question

2001-01-05 Thread Chris Withers
Christian Scholz wrote: yeah, this is exactly what I'm after too. I'd like the virtual objects the specialist is responsible for to have normal Zope management screens. Well, I think this shouldn't be too difficult to create. Just a subclass of Specialist and add some Contents-Tab,

Re: [Zope-dev] Product dev

2001-01-05 Thread Shane Hathaway
Chris Withers wrote: Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't

Re: [Zope-dev] Product dev

2001-01-05 Thread Chris Withers
Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't register, complain!

Re: [Zope-dev] Objects with multiple parents and storage flexibility, ZPatterns?

2001-01-05 Thread Chris Withers
Steve Spicklemire wrote: No... I don't think so! If you don't mind keeping stuff in ZODB then you *could* have a traversal interface that made stuff 'appear' wherever you want it to, though its persistent storage would 'really' be in a Rack or FwCS. Cool... how would I go about doing that?

Re: [Zope-dev] protocol accesibility

2001-01-05 Thread Chris Withers
Toby Dickenson wrote: IMO their goals are achieved better, and simpler, with a HOWTO that explains how to configure the 'access contents information' permission. That's not been my experience, but maybe that How-To would help :-) Care to write it? ;-) I think perhaps you havent appreciated

Re: [Zope-dev] Product dev

2001-01-05 Thread Shane Hathaway
Chris Withers wrote: Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we

Re: [Zope-dev] protocol accesibility

2001-01-05 Thread Chris Withers
Toby Dickenson wrote: That's not been my experience, but maybe that How-To would help :-) Care to write it? ;-) It is on my todo list cool :-) Protocol independence is not necessarily a good thing in this case. Different protocols have different capabilities. The zope way of

Re: [Zope-dev] CatalogAware

2001-01-05 Thread Michael Bernstein
Chris Withers wrote: Michael Bernstein wrote: uncatalog_object to be called on it (I'm not sure what method reindex_object causes to be called). unindex_object followed by index_object. I'm not convinced it's necessary, as no-one has said that uncataloging is a necessary step before

Re: [Zope-dev] CatalogAware

2001-01-05 Thread Chris Withers
Michael Bernstein wrote: Now I'm wondering how to duplicate the behaviour of Postings being contained within Squishdot, but not appearing in the 'Contents' tab. that's definitely a 'bad' thing :-( Why duplicate anyway? You writing a replacement? ;-) cheers, Chris

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Shane Hathaway
There's a (much) simpler way: class MyClass(Acquisition.Explicit): your_attribute = Acquisition.Acquired # index_html isn't index_html = None "Acquired" is a special object that the acquisition module looks for. However, I wasn't aware you could add a "1" to the ComputedAttribute

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Chris Withers
Shane Hathaway wrote: There's a (much) simpler way: class MyClass(Acquisition.Explicit): your_attribute = Acquisition.Acquired # index_html isn't index_html = None Cool :-) And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): #

Re: [Zope-dev] CatalogAware

2001-01-05 Thread Christopher Petrilli
On 1/5/01 7:16 AM, "Chris Withers" [EMAIL PROTECTED] wrote: uncatalog_object to be called on it (I'm not sure what method reindex_object causes to be called). unindex_object followed by index_object. I'm not convinced it's necessary, as no-one has said that uncataloging is a necessary step

[Zope-dev] BTree Folders

2001-01-05 Thread Chris Withers
Hi, There was talk a while back of re-doing BTree's in Zope so they were more efficient. Is that still going ahead? If I start using BTree folders now, will there be any nasties when the changes happen? Right, BTree folders wise, what I'm looking for is to have, in effect two Contents tabs for

[Zope-dev] zope on win95

2001-01-05 Thread nando n
where can i download (exact url) binary version of zope to install it on my win95 system? for now i've only been able to download python source code version of zope. how do i execute dtml files? i just want to know that. thanks

Re: [Zope-dev] BTree Folders

2001-01-05 Thread Steve Alexander
Chris Withers wrote: Right, BTree folders wise, what I'm looking for is to have, in effect two Contents tabs for one BTree folder object, one showing all contained items of a particular meta_type (with the BTree Folder's interface to deal with lots of objects), and the other containing all

[Zope-dev] SkinScript reference in two-up postscript

2001-01-05 Thread Steve Alexander
Hi folks, http://www.cat-box.net/steve/skinscript_ref-0-4-3b2.ps.gz This is a two-up A4 postscript version of PJE's most useful SkinScript reference. It prints out to four landscape-orientation A4 pages. http://www.cat-box.net/steve/skinscript_ref-0-4-3b2_letter.ps.gz This is similar,

Re: [Zope-dev] ZPaterns, Pluggins

2001-01-05 Thread Chris Withers
Steve Alexander wrote: If you're using ZPatterns anyway, After looking at ZPatterns for a few more days again, I still can't justify introducing that ammount of complexity to the project concerned. Also, ZPatterns seems very skewed towards TTW development now and, for CVS and distributability

[Zope-dev] ZPatterns: __getitem__ on a DataSkin instance

2001-01-05 Thread Steve Alexander
Let's say I have a DataSkin-derived ZClass that has the attribute "forename" (in a dataskin attribute propertysheet). If I get an instance of this ZClass from the ZODB (set up to use a Folder w/ customizer suppport), I can refer to the "forename" attribute using dtml-var "this()['forename']".

[Zope-dev] Re: ZPatterns: __getitem__ on a DataSkin instance

2001-01-05 Thread Steve Alexander
Steve Alexander wrote: Let's say I have a DataSkin-derived ZClass that has the attribute "forename" (in a dataskin attribute propertysheet). If I get an instance of this ZClass from the ZODB (set up to use a Folder w/ customizer suppport), I can refer to the "forename" attribute using

[Zope-dev] Re: Spitter.c Hack

2001-01-05 Thread Jason Spisak
Zopists, I finally got Splitter.c to let me index numbers and 'C++' in a TextIndex. I have about 50,000 objects in that index, and search performance is nearly instantaneous still. I am running on a big machine though. If anyone wants those changes there's really easy. Just mail me directly,

Re: [Zope-dev] Re: ZPatterns: __getitem__ on a DataSkin instance

2001-01-05 Thread Steve Spicklemire
Hi Steve, Hmm.. is the 'id' of your PythonScript also getattr? thanks, -steve "Steve" == Steve Alexander [EMAIL PROTECTED] writes: Steve Steve Alexander wrote: Let's say I have a DataSkin-derived ZClass that has the attribute "forename" (in a dataskin attribute

Re: [Zope-dev] Re: ZPatterns: __getitem__ on a DataSkin instance

2001-01-05 Thread Steve Alexander
Steve Spicklemire wrote: Hi Steve, Hmm.. is the 'id' of your PythonScript also getattr? Yes. I forgot to mention that. And, I realized just after posting the email to the list that calling a method "getattr" is asking for trouble :-) Actually, my workaround doesn't work except in the

Re: [Zope-dev] Re: Spitter.c Hack

2001-01-05 Thread Casey Duncan
Jason Spisak wrote: Zopists, I finally got Splitter.c to let me index numbers and 'C++' in a TextIndex. I have about 50,000 objects in that index, and search performance is nearly instantaneous still. I am running on a big machine though. If anyone wants those changes there's really

Re: [Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

2001-01-05 Thread Dieter Maurer
Steve Alexander writes: I like your idea. It is one way to implement my recent "lobbying" request with minimal effort. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Dieter Maurer
Chris Withers writes: And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): # your_attribute will be acquied # index_html won't index_html = None No, that is not enough! As a side effect to turn off acquisition, you defined the

[Zope-dev] ZPatterns: catching exceptions raised by triggers

2001-01-05 Thread Steve Alexander
Let's say I have a trigger that is called to ensure that what something is changed to holds true. I use some skinscript like this: WHEN OBJECT ADDED, CHANGED CALL self.ensure_conditions_hold() I write the ensure_conditions_hold method so that it returns None if everything is ok, but raises

Re: [Zope-dev] ZPatterns: catching exceptions raised by triggers

2001-01-05 Thread Phillip J. Eby
At 12:49 AM 1/6/01 +, Steve Alexander wrote: WHEN OBJECT ADDED, CHANGED CALL self.ensure_conditions_hold() I write the ensure_conditions_hold method so that it returns None if everything is ok, but raises an exception if there is a problem with the new state of the object. That's all

Re: [Zope-dev] Re: Spitter.c Hack

2001-01-05 Thread Jason Spisak
Casey Duncan: It truely is nothing more than cutting out the two parts that eliminate single letter words and numbers: *** Zope-2.2.4-src/lib/python/SearchIndex/Splitter.c --- Zope-2.2.4-src/lib/python/SearchIndex/Splitter_Old.c *** *** 169,192 len = PyString_Size(word)

Re: [Zope-dev] Re: Spitter.c Hack

2001-01-05 Thread Jason Spisak
Erik, [Jason Spisak] | I am running on a big machine though. If anyone wants those changes | there's really easy. Just mail me directly, since it's a long file | to post. Hi. I would be interested in the file :-). Okay, here's the diff. It truely is nothing more than cutting out

Re: [Zope-dev] CatalogAware

2001-01-05 Thread Michael Bernstein
Chris Withers wrote: Michael Bernstein wrote: Now I'm wondering how to duplicate the behaviour of Postings being contained within Squishdot, but not appearing in the 'Contents' tab. that's definitely a 'bad' thing :-( Why is that bad? A custom object management UI ('Postings' and