From: Ender [mailto:[EMAIL PROTECTED]]

First os all. Thank you for the patience. I know it is boring to "Solve
other peoples problems for them", but I am really trying hard myself,
reading the source 
of Zope and other products. It's just such a steap learning curve because it
is underdocumented. (I have 6+ years of experience in web scripting and 12+
in programming + database overall, so usually i catch on fast.)

>> I was under the impression that when I inherit ObjectManager that my
object
>> would be a complete ObjectManager. But do I have to overwrite some
methods
>> with my own?

>No you don't but generally an objectmanager would wants to add some
>custom logic, like a Folder which is a specialized objectmanager.

I don't want that in this product. It should just be a plain folder, where
anything can be put. Well at least Foders, images and dtml methods.

>ok, i'm not certain that i understand your problem. you original problem
>was getting dtml methods to show up in the manage views. in your product
>your it appears that your methods aren't really dtml methods that are
>contained within the objectmanager but rather class methods of the
>discussion class. to have them show up in the manage_views you need to
>change them to be methods that are added to a discussion object.

In my mxm_diskuss class I have a list containing messages:

self.testComments = [.....] (will be renamed to "comments" when it's done.)

These comments are not meant to be seen in the folder view, they should only
be visible when called through dtml methods. like this method to make a list
of all messages:

index_html:
<dtml-var standard_html_header>
<dtml-in testComments>
<b><a href="view?id=<dtml-var id>"><dtml-var title></a></b> 
By: <dtml-var author> <i><dtml-var date></i><br>
</dtml-in>
<dtml-var standard_html_footer>

What I find "brilliant" about the idea is that when a customer wants a
discussion group I only have to change 3 standard dtml files to give it a
new functional interface. And I can build a library of look and feels. And
there is no recursion in it so it will behave like a list, and be easily
codeable from dtml.

The last discussion product ever needed :-) It will be ZPL (when it's done.)

>here some code that illustrates how.
># add a folder for view
>self.manage_addFolder('views')
># get a file handle
>fh = open(join(Views_Dir, 'DiscussionIndex.dtml'))
># add a DTML method with contents of the file.
>self.views.manage_addDTMLMethod(id='news_center_index_html', file=fh)

>a method created this way will show up in the manage_view of the object.

My problem is not adding object programatically, but doing it in the
management  interface. When I add them I can press "add & edit" and I can
paste the dtml source, and the method works. But they don't show up on the
list when viewing the folder.

Well I guess that if I dont have to do anything special to add objects to an
objectmanager, then I must have a permission problem when viewing them. I
guess I will look more into that. Currently I am lookin for a permission
that prevents seing the ObjectItems in an objectmanager, but so far without
any luck.

grr... documentation.

Kind regards Max M

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to