[Zope-dev] Zope and python namespaces

2001-11-09 Thread Roch'e Compaan
I wrote an external method that uses Graphite, Sping and PIL to generate charts, but I ran into some namespace problems. Execution of the external method fails because there is a clash in the namespace between PIL and Zope. PIL has a module ImageFile and Zope does as well. Even if I insert

RE: [Zope-dev] ZPatterns Design Issue

2001-04-25 Thread Roch'e Compaan
I generally follow this approach for long lists and reports, but the tree tag is a bit more tricky because you only have a simple data object without the context that a real object provides. A real object makes it a lot simpler if you recursively draw a hierarchy - doing it with simple data

[Zope-dev] ZPatterns Design Issue

2001-04-24 Thread Roch'e Compaan
Hi Everybody We are porting a desktop application to Zope using Interbase and ZPatterns. In this application objects like Vintage, Farm, Vineyard, Block and Panel form a hierarchy and are displayed with the Zope tree widget. To build the hierarchy we use a method called getChildrenFor() on each

RE: [Zope-dev] ZPatterns Design Issue

2001-04-24 Thread Roch'e Compaan
How do you bind a SQL Result with multiple records with multiple instances of the class? Can you do this in Skinscript? Or do you mean I should return the sql result directly? Roché Why don't you just have the rack's getChildrenFor() method return instances of the correct class, with all

RE: [Zope-dev] ZPatterns: getItem returns None

2001-03-20 Thread Roch'e Compaan
Seems like the first element of the list of result objects returned by sqlGetAllotmentArea doesn't define anything called 'AllotmentArea_ID'. Could it be a case problem? What datbase/db_adaptor are you using? It is a case problem, which really surprised me because Interbase is not case

RE: [Zope-dev] ZPatterns: getItem returns None

2001-03-19 Thread Roch'e Compaan
In my experience, getItem will return None if *anything* goes wrong with data retieval or object creation. Sometimes you get a traceback in the STUPID_LOG, and sometimes you don't (and I haven't figured out the pattern yet). Test everything you can independently, and simplify everything

RE: [Zope-dev] ZPatterns: getItem returns None

2001-03-19 Thread Roch'e Compaan
On Mon, 19 Mar 2001, Roch'e Compaan wrote: In all simplicity I still can't get it to work but here's some more info from the console: Traceback (innermost last): File C:\PROGRA~1\ZOPE230\lib\python\Products\ZPatterns\AttributeProviders.py, line 335, in _AttributeFor (Object

[Zope-dev] ZPatterns: getItem returns None

2001-03-17 Thread Roch'e Compaan
I think I've read everything on the mailing lists on this issue, but have found no joy. I have a ZClass derived dataskin called AllotmentArea matching a table with the same name in my SQL RDBMS. I have a Specialist called AllotmentAreas with storage set to the AllotmentArea ZClass and load

RE: [Zope-dev] Specialists and __bobo_traverse__

2001-01-17 Thread Roch'e Compaan
Phillip J. Eby wrote: I'm pretty sure DTML methods *won't* work. "Python Methods" might. I don't know about external methods, python scripts, etc. I have successfully used PythonScripts for this. Does this mean I have to upgrade to 2.3 beta 1, because Python Methods on 2.2.4

[Zope-dev] Specialists and __bobo_traverse__

2001-01-16 Thread Roch'e Compaan
I'm still lost as to when __bobo_traverse__ is checked for object traversal and when not. I have very simple piece of SkinScript: WITH SELF COMPUTE __bobo_traverse__ = traversal_method. Looking at the traverse method in BaseRequest.py it looks to me as if an object is always checked if it has

Re: [Zope-dev] Specialists and __bobo_traverse__

2001-01-16 Thread Roch'e Compaan
It sounds to me like you're trying to have SkinScript supply a bobo_traverse for the Specialist itself, and this you cannot do. (There are other ways to change a Specialist's bobo_traverse behavior, but SkinScript is not one of them.) The SkinScript you're doing is meaningful only if you

[Zope-dev] Specialists and __bobo_traverse__

2001-01-15 Thread Roch'e Compaan
Recent sightings of the use of __bobo_traverse__ in SkinScript gave me hope of giving users a more useable breadcrumbs trail in the case where I have nested specialists. My TaskTemplates specialist is nested inside my RequestTypes specialist. When I retrieve a dataskin from the RequestTypes

RE: [Zope-dev] Specialists and __bobo_traverse__

2001-01-15 Thread Roch'e Compaan
With your code below, and with a concrete example, can you say what you want to happen, and what actually does happen? Thus results in a url like this: /RequestTypes/request type instance/Task Templates/task template instance, and what I ideally want is:

RE: [Zope-dev] Specialists and __bobo_traverse__

2001-01-15 Thread Roch'e Compaan
With your code below, and with a concrete example, can you say what you want to happen, and what actually does happen? In my traversal_method I have one line that simply changes a property on the specialist to see if the method is actually called but it does not seem like the traversal_method

[Zope-dev] ZPatterns and ZClass Views

2001-01-08 Thread Roch'e Compaan
I was wondering to what extent people using ZPatterns find the Views one can set up for a ZClass tolerant of the Role-centric approach followed by ZPatterns. For example: I have two Specialists, DocumentedProducts and Products. The Products specialist manages ZClasses of type

[Zope-dev] External method

2000-12-19 Thread Roch'e Compaan
This is not a strictly zope related question but it is zopeish :) In an external method I need to call an executable and capture the output it generates. This executable however needs to connect to a running X Server. I used the popen2 command but it returns with the obvious error : "theprogram

[Zope-dev] ZPatterns: General Design Question

2000-12-14 Thread Roch'e Compaan
As part of a Customer Relationship Management system our company is developing, we have a Licenses specialist which manages product licenses. All license objects do not have the same attributes however. The various attributes relating to different licence types are not known attributes from the

[Zope-dev] ZPatterns: Still Properties that are objects

2000-11-29 Thread Roch'e Compaan
I use external methods to set properties that are objects for my Dataskins. I have a Customer Dataskin with a property Address. Address is another Dataskin. In my editInstance for Customer I change the properties of Address directly: dtml-call

[Zope-dev] Mail and zope

2000-11-27 Thread Roch'e Compaan
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? Roché ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -

RE: [Zope-dev] Mail and zope

2000-11-27 Thread Roch'e Compaan
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? As far as I can see, there isn't any generation of a message-id in the MailHost product. [snip] Thanks for the suggestion, this is what I'm trying to do: We're building a customer relationship

[Zope-dev] Method calls

2000-11-23 Thread Roch'e Compaan
I have a method called getModulesForProduct to which I pass a ProductID eg: dtml-in "Products.Modules.getModulesForProduct(this(), _, ProductID)" sort=name If ProductID is passed on from a form variable it works fine. If I set the ProductID through REQUEST.set: dtml-call

RE: [Zope-dev] Method calls

2000-11-23 Thread Roch'e Compaan
OK.. it's the 'in' tag that's causing the problem. Why not try: dtml-var "experession that's causing problem with in" html_quote and see what 'in' is choking on... It's choking on a list of instances. This is what is returned when I "var" the expression: [Module instance at 8b97660,

[Zope-dev] ZPatterns: Dataskin property sheets

2000-11-13 Thread Roch'e Compaan
I'm not as clear as I'd like to be on when to use Dataskin property sheets and when to use common instance property sheets. I understand that with a Dataskin Property Sheet attributes are stored in way that is compatible with attribute providers making overriding of default values possible. If

[Zope-dev] ZPatters: Roles and remapping

2000-11-13 Thread Roch'e Compaan
An Organisation can play the role of Customer and of Requester. In this case the Requester specialist will remap from the Customer specialist. In terms of roles all Customers do not play the role of Requester. Would it be correct to say that the remapping to Requester only occurs at that point

[Zope-dev] RE: RFC : ZPatterns Customer Relationship Management Framework

2000-11-11 Thread Roch'e Compaan
Thanks for your comments on our model Philip, it is really appreciated and very enlightening. From your comments some other questions came to mind (I posted this on the Wiki as well): It seems that we did not give enough consideration for the pattern, Roles Before Objects but we can retrofit

[Zope-dev] RFC : ZPatterns Customer Relationship Management Framework

2000-11-10 Thread Roch'e Compaan
Thanks a lot for all the guidance on ZPatterns so far. Our company is building a Customer Relationship Management system using ZOPE and ZPatterns. We have a object model and basic Dataskins and Specialists in place. At this point we thought it a good idea to share the object model with the Zope

[Zope-dev] Objects that are properties

2000-11-08 Thread Roch'e Compaan
I have a Customer and Address ZClasses based on Dataskin as well as a CustomerManager specialist. The Customer ZClass has a external method setAddress: def setAddress(self, Address) self.Address = Address CustomerManager has a defaultRack and addressRack. The methods that adds the instance

[Zope-dev] ZPatterns: Non-ZODB storage and Racks

2000-11-08 Thread Roch'e Compaan
In Rack.py I noticed the following: a = self.loadAttrib if not a: slot = self._writeableSlot(key) slot[SelfKey] = item.aq_base# strip acquisition wrapping item._setSlot(slot) # Not needed for non-ZODB storage If item._setSlot

RE: [Zope-dev] Objects that are properties

2000-11-08 Thread Roch'e Compaan
This is a known problem. Use: dtml-let itemIDs="[]" dtml-in "addressRack.getPersistentItemIDs()" sort dmtl-call "itemIDs.append(_['sequence-item'])" /dtml-in Now you have the required itemIDs in itemIDs. /dtml-in Thanks Steve and thank you Phillip for ZPatterns. I've managed to

Re: [Zope-dev] ZPatterns: Non-ZODB storage and Racks

2000-11-08 Thread Roch'e Compaan
I'm not sure I understand your question. If you don't have something special you want to do by subclassing Rack, then the answer would be "no". :) You do answer my question below. I was wondering if this line would not cause an object to be stored in the ZODB by default. The comment

RE: [Zope-dev] ZPatterns: Non-ZODB storage and Racks

2000-11-08 Thread Roch'e Compaan
It's determined by the radio button setting on the Storage tab. If you neglected to set it to "loaded by accessing attribute " and fill in the blank, then your objects have been stored in the ZODB, as well as in the RDBMS. Thanks. I set "loaded by accessing attribute" to the

[Zope-dev] It's been a while

2000-11-06 Thread Roch'e Compaan
It's been a while since i've had time to explore ZPatterns - and now the time has come that I am considering to base development for a new project on ZPatterns. I think I'm better prepared now - I read Coad's Object Models, and implemented a data management layer in Delphi. The project envolves

[Zope-dev] ZODB

2000-10-04 Thread Roch'e Compaan
I am getting really funny problems with my Zope installation and I have no idea where to start looking. I for instance deleted a python product from the Products directory and when I start Zope the product is still listed in the Product list. I then packed the ZODB, cleared my Browser's cache,

[Zope] Mailhost TypeError

2000-10-02 Thread Roch'e Compaan
I'm recreated a mailhost in Zope 2.2.0. Whenever I want to send mail with sendmail tag I get a TypeError. This worked in Zope 2.1.x. This is the traceback: Traceback (innermost last): File /usr/local/zope/2-2-0/lib/python/ZPublisher/Publish.py, line 222, in publish_module File

RE: [Zope] Selection Property

2000-09-28 Thread Roch'e Compaan
You need to set up the "bandlist" method as the Value when adding the selection property, then make shure that the "bandlist" method is available from where you use the property sheet. Been there, done that, still no luck :) But in the dtml source for properties it says

[Zope] Squishdot

2000-09-07 Thread Roch'e Compaan
I've upgraded our Zope Server to 2.2.1 and upgraded squishdot to 7.1. Whenever I post an article on my squishdot sites I get an attribute error: _catalog. It seems like squishdot has trouble putting the article in the catalog. I did modify all references to thread[0] to getThread(0): Traceback