[Zope] Unable to create an instance of zclass within a zclass.

chas panda@skinnyhippo.com
Sat, 11 Sep 1999 01:28:09 +0900


At 08:18 AM 9/10/99 -0700, Bruce Dillahunty wrote:
>I have found a workaround to this (maybe it will point
>somebody to the solution)...
>
>If you move your subclass (ClassB) to the level of
>ClassA (directly inside of MyProduct)... then go
>create one. It will work. Now you can move it back
>"where it belongs" and all will continue to work, at
>least in my experience.
>
>It seems to need to have one instance created through
>the usual interface.


This worked great Bruce. Thank you. Althought this wouldn't
solve the problem for creating packages to distribute, it 
does indeed solve my needs and so I am very very grateful :
I can finally get on with building my app (after
over 24 hours complete downtime trying to solve this).
Am cc'ing the list because this deserves to to be in the 
archive and may prevent somebody else from wasting too
much time. 

Thanks again,

chas


>--- chas <panda@skinnyhippo.com> wrote:
>> Hi folks,
>> 
>>    This is one problem I've seen in the archives
>> several times but
>>    with no answer/solution (that I could find,
>> anyway) :
>> 
>>    - Created a new product (MyProduct) using the
>> Control Panel/Products
>>    - Inside MyProduct : created a new ZClass
>> (ClassA) based on ObjectManager.
>>    - Inside ClassA : created a new ZClass (ClassB)
>> based on ObjectManager.
>>    - Added a new instance of ClassA to the Zope root
>> using the 'add button'
>>    - Within this instance of ClassA, tried to add an
>> instance of ClassB
>>    - Error "Resource not found"
>>    - Traceback :
>>   File D:\Zope\lib\python\ZPublisher\Publish.py,
>> line 214, in publish_module
>>   File D:\Zope\lib\python\ZPublisher\Publish.py,
>> line 179, in publish
>>   File D:\Zope\lib\python\Zope\__init__.py, line
>> 201, in
>> zpublisher_exception_hook
>>     (Object: RoleManager)
>>   File D:\Zope\lib\python\ZPublisher\Publish.py,
>> line 151, in publish
>>   File D:\Zope\lib\python\ZPublisher\BaseRequest.py,
>> line 426, in traverse
>>   File D:\Zope\lib\python\AccessControl\User.py,
>> line 373, in validate
>>     (Object: RoleManager)
>>   File
>> D:\Zope\lib\python\ZPublisher\HTTPResponse.py, line
>> 510, in
>> notFoundError
>>   NotFound: (see above)
>> 
>>    In fact, just how are the zope permissions
>> objects used in this context ?
>> 
>> I've looked at KmNews and even tried copying that
>> (adding other objects
>> to the Subobjects tab) but can't see what the key
>> is, short of offering a 
>> sacrificial hedgehog to the zope gods.
>> 
>> thanks for any help,
>> 
>> chas
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://www.zope.org/mailman/listinfo/zope
>> 
>> (To receive general Zope announcements, see:
>> http://www.zope.org/mailman/listinfo/zope-announce
>> 
>> For developer-specific issues, zope-dev@zope.org -
>> http://www.zope.org/mailman/listinfo/zope-dev )
>> 
>> 
>
>===
>-- 
>Bruce C. Dillahunty
>Peachbush Enterprises
>
>__________________________________________________
>Do You Yahoo!?
>Bid and sell for free at http://auctions.yahoo.com
>
>