Re: [Zope-dev] Bugs in Zope Membership Component 0.8.0b1

2001-02-23 Thread Bill Anderson
Dirksen wrote: Hi Bill, All PythonScripts in ZMC 0.8.0b1 look like a direct port from Python Methods, so I found some bugs due to the incompatibility between these two version of scripts. 1. In 'passwordForm', 'import string' should be added.\ for those watching, it is actually

[Zope-dev] ZPatterns feature patch: kickTriggers

2001-02-23 Thread Steve Alexander
I've patched DataSkins.py to add this method: def kickTriggers(self,_v_status_=_v_status_,_v_dm_=_v_dm_): """Cause triggers to be set off at the end of this transaction, without needing to set any attributes.""" self = self._canonicalForm() if

[Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Hi All, I must say that I have very hard time with both Scripts and Zclass. My problem is the context and the container proprties of a script inside a Zclass. If I understand well the context is an URL point of view, the object accessed through the web. The container is fixed, it's the

Re: [Zope-dev] Python Script

2001-02-23 Thread Steve Alexander
Cyril Elkaim wrote: Hi All, I must say that I have very hard time with both Scripts and Zclass. My problem is the context and the container proprties of a script inside a Zclass. If I understand well the context is an URL point of view, the object accessed through the web. The

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Thanks Steve, In this case, container is the ZClass instance. Understood, that was my conclusion and it's logical. One more question please :-) How can I access the methods definitions of the zclass from an instance ? I don't talk about calling them but getting an 'attribute' of the

Re: [Zope-dev] ZPatterns feature patch: kickTriggers

2001-02-23 Thread Steve Spicklemire
Hmmm... tripTriggers(...) pullTriggers(...) fireTriggers(...) ;-) dunno... kickTriggers works for me... -steve "SA" == Steve Alexander [EMAIL PROTECTED] writes: SA I've patched DataSkins.py to add this method: ... SA I'd welcome suggestions on a better name for the method

Re: [Zope-dev] Python Script

2001-02-23 Thread Steve Alexander
Cyril Elkaim wrote: How can I access the methods definitions of the zclass from an instance ? I don't talk about calling them but getting an 'attribute' of the zclass knowing only its name at _runtime_ not _compile_ time? I don't entirely understand what you want to do. Calling a method

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Hi Steve, In the zclass definition I have a bunch of Image objects together with the following script. SCRIPT s_center(width, height, image): import string result = None for item in container.objectItems(): if string.strip(item[0]) == image: image_width =

Re: [Zope-dev] Python Script

2001-02-23 Thread Steve Alexander
Cyril Elkaim wrote: This script works fine if I test it inside the test tabs of the zclass. But if I run it from an instance 'container.objectItems()' returns nothing. I understand why but my problem is how to get access of the images from the instance. What I need is something giving

[Zope-dev] Zope and persistence in product dev.

2001-02-23 Thread Jan Murre
Hi all, I have the following question about Persistence in Zope. I am developing a Product. This product is using some classes internally. These classes are non Zope classes. I found out in one of the How-To's that the Zope persistence machinery can be triggered with the expression: _p_changed

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Erik Enge
On Thu, 22 Feb 2001, Chris McDonough wrote: I'm not sure why this isn't in 2.3.1b1, but yes, the code in getobject was changed to use unrestrictedTraverse for this very reason. On closer inspection, I can see that it is actually changed in 2.3.1b1. It does say unrestrictedTraverse (line 457,

Re: [Zope-dev] Minor typos/changes to ZCatalog.

2001-02-23 Thread Chris McDonough
Today's show opens with an usability bug (that's what it looks like to me, anyway). Sit back and feel free to buy an albatross from the strange man. I've got a ZCatalog named Catalog, living its normal life at /. When I'm in /Catalog/manage_catalogIndexes the index names are a href's.

Re: [Zope-dev] ZPatterns feature patch: kickTriggers

2001-02-23 Thread Michael R. Bernstein
Steve Alexander wrote: I'd welcome suggestions on a better name for the method than "kickTriggers". :-) Well, in keeping with the nomenclature of RuleAgents and IndexingAgents, how about DoubleAgent (it secretly works for another Specialist)? Michael Bernstein

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Steve Alexander wrote: for name,object in container.objectItems(): if string.strip(name) == image: image_width = int(object.getProperty("width")) image_height = int(object.getProperty("height")) Thanks again :-), I passed too much time with Javascript and not enough with

Re: [Zope-dev] Python Script

2001-02-23 Thread Cyril Elkaim
Thanks Steve, I will try... Cyril ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Chris McDonough
No... what are you getobjecting? Does it happen only with certain kinds of objects? Are they ZClass objects or Product-based objects? - Original Message - From: "Erik Enge" [EMAIL PROTECTED] To: "Chris McDonough" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 23, 2001

[Zope-dev] ZCatalog distinct in SQL

2001-02-23 Thread Valérie Aulnette
Hi, I am using PTK and it does work with ZCatalog. I need to do the list of values that are in the catalog but I need do do like a "select distinct" in SQL to have each value only once. Do you know how to do that in ZCatalog ? Thanks. Valerie.

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Erik Enge
On Fri, 23 Feb 2001, Chris McDonough wrote: No... "No" to which question? what are you getobjecting? Does it happen only with certain kinds of objects? Are they ZClass objects or Product-based objects? It happens with all kinds of objects I have in my index. All my objects in the index

Re: [Zope-dev] Minor typos/changes to ZCatalog.

2001-02-23 Thread Erik Enge
On Fri, 23 Feb 2001, Michael R. Bernstein wrote: On the subject of numbers, I was wondering how to index alphanumeric values like ISBN numbers. Why can't you use FieldIndexes? ___ Zope-Dev maillist - [EMAIL PROTECTED]

[Zope-dev] Traceback strangeness and default width/height (and those funnyPython Methods)

2001-02-23 Thread Erik Enge
Is it just me, or has the tracebacks provided by Zope when an Exception is raced gotten "worse"? In Zope 2.3.1b1 it usually says file: DT_In (or one of them), and doesn't even mention the file which the Exception was raised from. Also, When I set the default width/height with the new ZMI and

Re: [Zope-dev] ZCatalog distinct in SQL

2001-02-23 Thread Casey Duncan
--- Valérie Aulnette [EMAIL PROTECTED] wrote: Hi, I am using PTK and it does work with ZCatalog. I need to do the list of values that are in the catalog but I need do do like a "select distinct" in SQL to have each value only once. Do you know how to do that in ZCatalog ? Thanks.

Re: [Zope-dev] AttributeError validate using the Visitor pattern

2001-02-23 Thread R. David Murray
On Mon, 19 Feb 2001, Itai Tavor wrote: You posted your questions 3 days ago, so maybe you found a solution by now... but this might still be useful to you. I just unwrapped the visitor pattern into an psuedo-case statement grin. - I'm passing _ explicitly instead of relying on binding. I

Re: [Zope-dev] ZCatalog stuff

2001-02-23 Thread R. David Murray
On Thu, 22 Feb 2001, Chris Withers wrote: Apart from that, any ideas how I'd search for a record where the indexed attribute is blank or the secondary sort stuff? Somebody contributed a patch for the secondary sort stuff a while back. Whether it still works with 2.3.0 is a good question. I

Re: [Zope-dev] ZPatterns feature patch: kickTriggers

2001-02-23 Thread R. David Murray
On Fri, 23 Feb 2001, Steve Alexander wrote: I'd welcome suggestions on a better name for the method than "kickTriggers". :-) armTriggers --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No

Re: [Zope-dev] ZCatalog stuff

2001-02-23 Thread Steve Spicklemire
Hi Chris, RDM.. There's also Zieve for this sort of thing... it seems to work well enough for me... -steve "RDM" == R David Murray " [EMAIL PROTECTED] writes: RDM On Thu, 22 Feb 2001, Chris Withers wrote: Apart from that, any ideas how I'd search for a record where the

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Chris McDonough
"No" to which question? No to the question "And is there a way to actuall give access to restrictedTraverse (or, probably more corretly, to let it traverse)?" what are you getobjecting? Does it happen only with certain kinds of objects? Are they ZClass objects or Product-based objects?

Re: [Zope-dev] Minor typos/changes to ZCatalog.

2001-02-23 Thread Chris McDonough
Probably. Keyword indexes work too. Yeah, that was what I was getting at :) Yes. This is the number of objects indexed by the index. If it's not working, that's a bug. Then it looks like a bug. Lucky us, I don't have time to analyze this in a week or so. Sorry. I'd like to help.

[Zope-dev] REQUEST acting up and misplacing form elements in other

2001-02-23 Thread Morten W. Petersen
Hi zopers, I've been wondering what may be causing the REQUEST object to store form values in the other dictionary. Is this a new feature or simply a bug? Cheers, Morten ___ Zope-Dev maillist - [EMAIL PROTECTED]

Re: [Zope-dev] Minor typos/changes to ZCatalog.

2001-02-23 Thread Erik Enge
On Fri, 23 Feb 2001, Chris McDonough wrote: Maybe a "This How-To covers product such-and-such version x.x" is in order as a standard feature of the How-To? This is a good idea. It would be an even better idea to allow folks to add comments to howto pages, so that if the original author

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Chris McDonough
different python classes. Do they inherit from a common base class? Did you make these objects or are they from another Product or are they standard Zope objects (like DTML methods, etc.)? - Original Message - From: "Erik Enge" [EMAIL PROTECTED] To: "Chris McDonough" [EMAIL PROTECTED]

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Erik Enge
On Fri, 23 Feb 2001, Chris McDonough wrote: It happens with all kinds of objects I have in my index. All my objects in the index are from Python-based products. Are they all of one type? The same type (as in, they are all Python based), but with different meta_types. Can you

[Zope-dev] Get browser information from HTTP_USER_AGENT..

2001-02-23 Thread Pattreeya Tanisaro
Hello! I would like to get the information about user's browser but when I add these following tags in my dtml header, the result from the third condition is always true. (I checked with netscape and konqueror and the results were the same, Your browser is neither IE nor Netscape. )

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Chris McDonough
And any access to getobject with any data_record_id_ returns unauthorized for any user besides emergency user? Hm... No, not entirely correct. If I don't get any hits, I don't get the unauthorized, but that is probably because I don't even try the getobject. The point I'm making is

[Zope-dev] SECURITY alert and hotfix release...

2001-02-23 Thread Brian Lloyd
Hello All, Casey Duncan uncovered a potential security issue today that necessitated a hotfix release. This hotfix addresses an important security issue that affects Zope versions up to and including Zope 2.3.1 b1. The issue is related to ZClasses in that a user with through-the-web

Re: [Zope-dev] ZCatalog madness. (Must log in as emergencyuser.)

2001-02-23 Thread Erik Enge
On Fri, 23 Feb 2001, Chris McDonough wrote: I meant to narrow down the problem domain in cases where you do call getobject... cases where you aren't calling getobject are not relevant. Ok. I see. It would be helpful to find out for which objects getobject fails and for which it succeeds

[Zope-dev] Zope book now in public CVS

2001-02-23 Thread Michel Pelletier
Greetings! The Zope book is now available in raw (structured text) format in a sourceforge CVS repository. We are also using SF's bug tracking and other tools to allow you better report problems to us than just email. If you'd like to check the book out of CVS, follow the instructions on this

[Zope-dev] Re: [Zope] Get browser information from HTTP_USER_AGENT..

2001-02-23 Thread Tino Wildenhain
Hi Pattreeya, First of all, DONT USE USERAGENT header for anything but informal. You simply cant depend on that because its free form. Much hassle these days came from people who didnt understand that. Thats why all browsers call themself "Mozilla"... Best way to get "informal" things from the

Re: [Zope-dev] Minor typos/changes to ZCatalog.

2001-02-23 Thread Michael R. Bernstein
"R. David Murray" wrote: On Fri, 23 Feb 2001, Michael R. Bernstein wrote: As you can see by the second example, an ISBN can have letters as well as numbers in it, so it cannot be represented by an integer. Text indexes seem to ignore 'words' that contain numbers, though. Any