solution to RoleManager error when creating zclass inside zclass (was Re: [Zope] outstanding zclass questions.) zclass (was Re: [Zope] outstanding zclass questions.)
Sort of - it all comes down to "how do we use zope permissions ?". But question 6 describes a situation that many people will find themselves in when building products with nested classes. Are they broken or is there some secret voodoo mantra that we must chant to get it to work ?
Ok, I've been playing around with this for the past two days, and here's what I've been able to figure out so far:
1) Create a Product. 2) Create a ZClass (Class1). 3) In Class1, create a ZClass (Class2). 4) Go back to Class1 and open the "Permissions" tab. Highlight "Add Class2". Click Change. 5) Go back to the "Methods" tab. Open "Class2_factory". Click Change (without changing anything). 6) Go to the root of your Zope installation and add Class1. Open Class1 and click Add.
Works here!
Superb, Nick - it works a treat. Looks like I can have a productive zope weekend - thanks indeed :)
I think the key step in getting it to work correctly is top open "Class2_factory" and click Change.
Yes... Step 4 isn't even necessary though it is more explicit.
I don't think it's setting up the link to Class2_addForm correctly when it first gets created.
How on earth did you work this one out ? Thank you again ! chas ps. I've changed the subject line so that this email/post might be found more easily by others searching egroups.com in the future (since egroups doesn't do any threading in its archiving)
On Sat, 11 Sep 1999, chas wrote:
I think the key step in getting it to work correctly is top open "Class2_factory" and click Change.
Yes... Step 4 isn't even necessary though it is more explicit.
Ahhh, great. That's the first thing that I tried when I ran into this problem, and I kind of got into the habit of doing it I guess.
I don't think it's setting up the link to Class2_addForm correctly when it first gets created.
How on earth did you work this one out ?
Mostly just dumb luck :) When you get the "Resource not Found" error, if you view the source it'll tell you the URL that it was trying to go to (as well as show you the astoundingly informative error message "who knows?") which happens to be Class2_addForm. So I went and took a look at the Class2_factory, which defines the initial method to call during creation. It was, correctly, set to Class2_addForm, so I decided it just wasn't stored correctly when you first create the ZClass. I assumed clicking Change would store the correct value, and luckily, I was right :)
Thank you again !
chas
ps. I've changed the subject line so that this email/post might be found more easily by others searching egroups.com in the future (since egroups doesn't do any threading in its archiving)
Good call ;) Nick Garcia | ngarcia@codeit.com CodeIt Computing | http://codeit.com
participants (2)
-
chas -
Nick Garcia