RE: [Zope-dev] Zope and python namespaces

2001-11-12 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 > >

[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 inser

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" o

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

[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: 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 sens

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\Prod

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 > everythi

[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 attri

RE: [Zope-dev] Specialists and __bobo_traverse__

2001-01-18 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. Did you have to do anything special in setting up rights for your traversal me

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.

RE: [Zope-dev] Specialists and __bobo_traverse__

2001-01-17 Thread Roch'e Compaan
> I don't have the slightest idea what you're trying to accomplish here - I > probably missed the beginning of this thread. Do you want to change the > way the specialist processes the string "dataskin1", or the way dataskin1 > processes the URL component that comes next? Each requires a diffe

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 y

[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 a

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_metho

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//Task Templates/ > instance>, > > and what I ideally want is: > > /RequestTypes//. Let's say I have a Request

[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 speci

[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 'Product'.

[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

RE: [Zope-dev] ZPatterns: General Design Question

2000-12-14 Thread Roch'e Compaan
>However, if your application needs to have end-user (as opposed to integrator-user) What is a integrator-user? > There is also an option "c", which would be to model > LicensePropertyDefinition and LicenseProperty objects in your > domain model. > This approach leads to a bit more work defining

[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 o

Re: [Zope-dev] FW: ZPatterns, ObjectDomain, UML and all that.....

2000-12-05 Thread Roch'e Compaan
> If you want to store one DataSkin inside another, where either one of them > is stored in a Rack, you will have to create appropriate SkinScript or > custom attribute providers to do so. But what if I always store dataskins in there own racks but simply assign an attribute of one Dataskin to

[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: but this results into a keyError afters a couple of edits

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 relations

[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 - htt

RE: [Zope-dev] Method calls

2000-11-23 Thread Roch'e Compaan
All apologies, I was looking at the wrong "dtml-in". It must be me choking on the workload :) roché >OK.. it's the 'in' tag that's causing the problem. Why not try: > > > > and see what 'in' is choking on... ___ Zope-Dev maillist - [EMAIL P

[Zope-dev] ZPatterns: Properties that are objects

2000-11-23 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, that is another Dataskin. In my editInstance for Customer I change the properties of Address directly: but this results into a keyError afters a couple of edits. Wh

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: > > > > 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: [, , , ] ___ Zope-Dev maillist - [EMAIL P

RE: [Zope-dev] Method calls

2000-11-23 Thread Roch'e Compaan
sattr' is the function that is complaining do you use > it in your code? > > -steve > >>>>> "Roch'e" == Roch'e Compaan <[EMAIL PROTECTED]> writes: > > Roch'e> I have a method called getModulesForProduct to which I >

[Zope-dev] Method calls

2000-11-23 Thread Roch&#x27;e Compaan
I have a method called getModulesForProduct to which I pass a ProductID eg: If ProductID is passed on from a form variable it works fine. If I set the ProductID through REQUEST.set: , I get a TypeError: Error Type: TypeError Error Value: hasattr, argument 2: expected string, int found I'v

[Zope-dev] ZPatterns: Methods of specialits

2000-11-22 Thread Roch&#x27;e Compaan
I have a specialist Contacts and for Contacts I have a method getAllContactsForCustomer. Whenever I want to call this method I have to pass on the whole namespace and the object itself to get it to work eg: getAllContactsForCustomer(this(), _, _.None). Why is this the case? And what does _.None

[Zope-dev] ZPatters: Roles and remapping

2000-11-13 Thread Roch&#x27;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] ZPatterns: Remapping object from on to another specialist

2000-11-13 Thread Roch&#x27;e Compaan
Another fuzzy freaky area for me: How will one implement the remapping of an object from on to another specialist? Say I have Requesters (Customer's with service requests) specialist that I want to map to Customers Should I still set up a rack and set it's storage to the Customer ZClass and add

[Zope-dev] ZPatterns: Dataskin property sheets

2000-11-13 Thread Roch&#x27;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 t

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

2000-11-11 Thread Roch&#x27;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 th

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

2000-11-10 Thread Roch&#x27;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 c

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

2000-11-08 Thread Roch&#x27;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 at

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

2000-11-08 Thread Roch&#x27;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 comme

RE: [Zope-dev] Objects that are properties

2000-11-08 Thread Roch&#x27;e Compaan
>This is a known problem. Use: > > > > > > > Now you have the required itemIDs in itemIDs. > > Thanks Steve and thank you Phillip for ZPatterns. I've managed to create a very basic framework storing attributes in the ZODB and in a SQL RDBMS. I'm elated. This is the way to write applic

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

2000-11-08 Thread Roch&#x27;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 se

[Zope-dev] Objects that are properties

2000-11-08 Thread Roch&#x27;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 co

[Zope-dev] ZPatterns and Properties that are objects

2000-11-07 Thread Roch&#x27;e Compaan
On the Road: I created a couple of ZClasses based on Dataskin. In the way I grok ZOPE, properties that are objects can not go onto property sheets. So if I have a Customer ZClass that has a property Address (a property that is an object) then I would create the address object as a "method" of t

RE: [Zope-dev] It's been a while

2000-11-06 Thread Roch&#x27;e Compaan
> DataSkins are for PD and UI classes. It's usually simplest to combine PD > and UI, and as long as you ensure that UI methods call PD methods, not the > other way around, then it works fine. Thanks Philip, simple divide with great effect on my understanding and thanks Steve for the links. My

[Zope-dev] It's been a while

2000-11-06 Thread Roch&#x27;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&#x27;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, a