Re: [Zope-dev] Python Product as DataSkin

2001-02-19 Thread Steve Alexander
Michael R. Bernstein wrote: Hmm. I thought I was doing it wrong. Here is the error and traceback from trying to instantiate the modified Product (through the standard mgmt interface): This resource may be trying to reference a nonexistent object or variable _v_dm_ snipped Any

[Zope-dev] ConflictErrors and how to handle them

2001-02-19 Thread Morten W. Petersen
Hi guys, I've been struggling with a problem, namely ConflictErrors. At times, a long-running process may add 100, 1000, 1 objects to a single folder. Under this process, several ConflictErrors may be raised, but they are captured, and the transaction committed again. Problem solved.

Re: [Zope-dev] Python Product as DataSkin

2001-02-19 Thread Michael R. Bernstein
Steve Alexander wrote: Is the __init__ method of DataSkin getting called? This would happen if, for example, you define an __init__ method in your class, but you don't use something like: from Globals import default__class_init__ default__class_init__(yourClass) (At least, I

Re: [Zope-dev] how to create third party Product?

2001-02-19 Thread Casey Duncan
Huayin wang wrote: It would be great if someone can tell me how to create a third party product in 1) dtml, 2) python method. Does it depend on whether the product is a ZClass product? Where's the documentation that I can read to get a clue? thanks! Check out:

[Zope-dev] Refresh vs Python Scripts

2001-02-19 Thread Chris Withers
Do these two play nicely together? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -

Re: [Zope-dev] Refresh vs Python Scripts

2001-02-19 Thread Shane Hathaway
Chris Withers wrote: Do these two play nicely together? If you mean to refresh the Python Scripts product, I don't know of a reason why that wouldn't work. I just tried it and it seems to be fine. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED]

Re: [Zope-dev] Python Product as DataSkin

2001-02-19 Thread Michael R. Bernstein
"Phillip J. Eby" wrote: At 10:47 PM 2/18/01 -0800, Michael R. Bernstein wrote: Hmm. So I need to refactor the 'manage_add' method inside the python product into two methods, 'manage_add' which would be used by the 'normal' object creation process and that would also call a second 'setup'

Re: [Zope-dev] Refresh vs Python Scripts

2001-02-19 Thread Chris Withers
Shane Hathaway wrote: Chris Withers wrote: Do these two play nicely together? If you mean to refresh the Python Scripts product, I don't know of a reason why that wouldn't work. I just tried it and it seems to be fine. Cool, must have been something else :-) cheers, Chris

[Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Chris Withers
Hi, I've got an object which implements __setitem__ in such a way that it's perfectly safe for use in Python Scripts. Sadly, it seems that Evan's Byte Code hacks won't let me do this :-( Whenever I try to do something like: myobject['fish']=1, I get a traceback like the following: Traceback

[Zope-dev] More PythonScript woe :-(

2001-02-19 Thread Chris Withers
If I try and do: if type(x) == type(0): ...I get a NameError on type :-( What is so bad about type that I can't use it safely in PythonScripts?!? frustratedly, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED]

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Christian Scholz
Hi! So as the item is an instance of my ZClass containing also an company_name attribute it will always return the item and because of that the Rack thinks it's already there. So why is this happening? What do I need to change? You need to use an attribute which the object has *if and

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Phillip J. Eby
At 05:29 PM 2/19/01 +0100, Christian Scholz wrote: You need to use an attribute which the object has *if and only if* it exists in the database. If the class has the attribute defined, all instances exist, and you can't even load it with SkinScript because ZPatterns uses __getattr__ to

[Zope-dev] Design explanation (Was: SkinScripts instantiating new objects)

2001-02-19 Thread Stefan Karlsson
At 16:21 2001-02-16, Steve Alexander wrote: Stefan Karlsson wrote: BTW is it possible to save the ProjektHandler instance persistently in the attribute? Is there an easier way than creating a separate specialist for the ProjektHandler class and storing the instances there? I think you're

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Christian Scholz
Hi! So I shouldn't define it inside the ZClass propertysheet? Do I understand this right? (I remember having problems when using properties not defined in a sheet somewhere.. or am I mistaken completely somehow? ;-) You can't do this with a load attribute, because a default value will

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I've got an object which implements __setitem__ in such a way that it's perfectly safe for use in Python Scripts. Sadly, it seems that Evan's Byte Code hacks won't let me do this :-( The only way that the security code can know that your __setitem__ is

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Chris Withers
Evan Simpson wrote: The only way that the security code can know that your __setitem__ is safe is to rename (or alias) it to __guarded_setitem__. Ditto for other such methods. Cool :-) Hmmm... I'm sure __getitem__ works okay though ;-) if type(x) == type(0): Use the Script builtin

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] But what's so bad about type()?! When applied to an Extension Class, it gives you access to the actual class, rather than a nice inert type. Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Chris Withers
Evan Simpson wrote: From: Chris Withers [EMAIL PROTECTED] But what's so bad about type()?! When applied to an Extension Class, it gives you access to the actual class, rather than a nice inert type. Hmmm arguably a bug in ExtensionClass, but not one I'm gonna try and fix ;-) Oh

[Zope-dev] Zope Newbie

2001-02-19 Thread John Bennett
Hi all, I hope I am not posting this to the wrong newsletter, I am seeking some advice regarding using zope on my organizations site.. I am creating a Developers Recouse Community site, which will have a lot of features, I was hoping someone may be able to point me in the direction to

Re: [Zope-dev] Python Product as DataSkin

2001-02-19 Thread Steve Alexander
Michael R. Bernstein wrote: Steve Alexander wrote: Is the __init__ method of DataSkin getting called? This would happen if, for example, you define an __init__ method in your class, but you don't use something like: from Globals import default__class_init__

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Phillip J. Eby
At 05:50 PM 2/19/01 +0100, Christian Scholz wrote: (though I am still confused a little, as I tried one non-existing attribute and it didn't work. But this one also was not defined inside the SkinScript and the database). As I said, the attribute must exist if and only if the row is in the

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Phillip J. Eby
At 05:25 PM 2/19/01 +, Chris Withers wrote: Hmmm arguably a bug in ExtensionClass, but not one I'm gonna try and fix ;-) It's not a bug, it's a feature -- the feature that is the reason for the very existence of ExtensionClasses in the first place: merging of the notion of type and

[Zope-dev] RE: [Zope] Newcomer

2001-02-19 Thread Bob Gailer
Andy: Thank you for replying to my questions. I'd like to clarify some of them, and see where I should be asking them. I do realize they are not Zope-specific issues. My assumption is that other Zope developers have encountered similar needs and have solved them. Re client stuff: Part of the

Re: [Zope-dev] RE: [Zope] Newcomer

2001-02-19 Thread Andy McKay
The person who introduced me to Zope said that there was a Python runtime version that could run bytecode in a page using the JVM in a browser. So I need to know if this is true, and how to set it up. Sorry I couldn't really tell you. I've never used it myself. Uggh Visual FoxPro? Don't

[Zope-dev] Zope Directions Roadmap Posted

2001-02-19 Thread Amos Latteier
Hello Zopistas, I am excited to announce a Zope Directions Roadmap. http://dev.zope.org/Resources/ZopeDirections.html This document summarizes current thinking at DC about where the Zope platform is going from an architectural point of view. It summarizes informal conversations that we've

Re: [Zope-dev] Python Product as DataSkin

2001-02-19 Thread Michael R. Bernstein
Steve Alexander wrote: Michael R. Bernstein wrote: Steve Alexander wrote: Is the __init__ method of DataSkin getting called? This would happen if, for example, you define an __init__ method in your class, but you don't use something like: from Globals import

[Zope-dev] ZPatterns goes crazy after ZClass change

2001-02-19 Thread Itai Tavor
Hi, I have a Rack which uses ZClass Company for storage. I renamed Company to CompanyX and created a new Company ZClass, giving it the same methods, propertysheets and properties as CompanyX. When I tried to view editInstanceForm_html of an instance of this class, I got the method stored in

Re: [Zope-dev] Zope 2.2.4 Dying

2001-02-19 Thread Andre Schubert
Hi all, my problems are going on :( and i need help. 2001-02-19T20:21:07 ERROR(200) zdaemon zdaemon: Mon Feb 19 21:21:07 2001: Aiieee! 20154 exited with error code: 13 2001-02-19T20:21:07 INFO(0) zdaemon zdaemon: Mon Feb 19 21:21:07 2001: Houston, we have forked 2001-02-19T20:21:07 INFO(0)