Re: [Zope] How to make two racks work under one specialist?

2000-12-29 Thread Steve Spicklemire
Hi Dirksen, I think the problem you are having has to do with using 'getItem'. From the SkinScriptSyntax Wiki page: "If the RESULT is NOT_FOUND, the search for the attribute value falls through to the next declaration (or attribute provider if the SkinScript is finished). If there is an

Re: [Zope] How to make two racks work under one specialist?

2000-12-28 Thread Steve Spicklemire
Hi Dirksen.. try this: WITH Deliverables.getItem(self.id) COMPUTE name=((RESULT is _.None) and 'none available') or RESULT.name What are you using as the 'load by accessing attribute' attribute? -steve ___ Zope maillist - [EMAIL PROTECTED]

Re: [Zope] How to make two racks work under one specialist?

2000-12-28 Thread Dirksen
Hi Steve, It works! Thank you. Still there's a couple of things to be cleared. What's the use of 'otherwise' clause? And is it true that the 1st 'with' clause fails, the whole skinscript process fails (so one 'with' clause is all one skinscript can put up with)? Dirksen

Re: [Zope] How to make two racks work under one specialist?

2000-12-22 Thread Steve Spicklemire
Hi Dirksen, OK.. the problem was that DataSkinAddons:DummyDataSkin doesn't allow access to attributes of 'self'. Once I switched to a differnt ZClass (which is a direct subclass of DataSkin) then everything was fine again.. ) just for Facade instances: I'm now using WITH

Re: [Zope] How to make two racks work under one specialist?

2000-12-22 Thread Steve Spicklemire
Hi Dirksen, For your 'otherwise' case, could you have a single instance that serves as an 'unknown' object: WITH Deliverables.getItem(self.id) COMPUTE originalObject=RESULT or NOT_FOUND OTHERWISE originalObject=Deliverables.getItem('Unknown') where it is known that the Deliverables

Re: [Zope] How to make two racks work under one specialist?

2000-12-21 Thread Steve Spicklemire
Hi Dirksen, Did you say you were using 0.4.3b1 or b2? I think that this sounds like the bug from b1: http://lists.zope.org/pipermail/zope-dev/2000-October/007650.html -steve "Dirksen" == Dirksen [EMAIL PROTECTED] writes: Dirksen One more question, i.e. the following expression

Re: [Zope] How to make two racks work under one specialist?

2000-12-21 Thread Steve Spicklemire
Hi Dirksen, Hmm.. this is starting to look like a bug. I tried the same thing with the ZPatterns example. I have a real site using this technique with ZPatterns-0.4.2a?? and it's working, so it's probably something introduced in 0.4.3. Here's what I did: I created a new Specialist 'Facade'

Re: [Zope] How to make two racks work under one specialist?

2000-12-20 Thread Dirksen
Hi Steve, I've made my experiment simple, by playing with the DumbZPatterns examples, testing one rack under one specialist. Here is the skinscript: WITH Deliverables.getItem(self.id) COMPUTE name=name, dueDate=dueDate, description=description, todoIDs=todoIDs WITH SELF COMPUTE

Re: [Zope] How to make two racks work under one specialist?

2000-12-20 Thread Dirksen
Hi Steve, Deliverables has objects. The call to existent objects are successful. It's the call to the inexistent objects that doesn't turn out expectedly. But the first thing is whether my script is correct. Do you thing so? And any other way to test this kind of situation, i.e. passing

Re: [Zope] How to make two racks work under one specialist?

2000-12-18 Thread Steve Spicklemire
Hi Dirksen, Ok.. you need to set the 'load by accessing attribute' field to 'original_object'. You may need to change your SkinScript to something like: WITH getMale(self.id) COMPUTE original_object=(RESULT is _.None) and NOT_FOUND or RESULT So that when getMale returns _.None, the

Re: [Zope] How to make two racks work under one specialist?

2000-12-17 Thread Dirksen
Hi Steve, Both racks are set to be loaded by accessing 'id', which, as you guessed right, don't appear in handling attributes list! This is the simplified skinscript in maleMemberRack: WITH getMale(self.id) COMPUTE original_object=RESULT WITH self.original_object COMPUTE name=id,

[Zope] How to make two racks work under one specialist?

2000-12-16 Thread Dirksen
I set up two racks in one specialist, one is maleMemberRack, the other femaleMemberRack. Both are loaded by accessing attribute id, and have skinscripts to retrieve data from a db. Suppose the femaleMemberRack gets loaded first, it finds out from the db that the 'id' is a male, then how can it

Re: [Zope] How to make two racks work under one specialist?

2000-12-16 Thread Steve Spicklemire
Hi Dirksen, Hmm... why not have the query that gets data qualify by gender: SQL Query: getMemberByGender parameters member_id, gender select * from members where dtml-sqltest member_id type=string and dtml-sqltest gender type=string Then in the SkinScript for maleMemberRack: WITH

Re: [Zope] How to make two racks work under one specialist?

2000-12-16 Thread Steve Spicklemire
Hi Dirksen, Forgot to mention... you should probably choose some attribute other than 'id' as the attribute to check for your DataSkin. The 'id' attribute is always there... -steve "Steve" == Steve Spicklemire [EMAIL PROTECTED] writes: Steve Hi Dirksen, SteveHmm... why not