Re: [Zope] DTML difficulties

2001-01-30 Thread ender







same thing for taskforces

your error from what you tried was because you were trying to treat
the taskforce and job folder objects as lists which they aren't. what you had 
would work, if you changed your  to reference the respective folders 
objectValues method which will return a list of objects which  will 
iterate over.

kapil


On Tuesday 30 January 2001 15:12, Nolan Darilek wrote:
> I'm working on my first zope product and, while everything has gone
> relatively smoothly so far, I'm having some issues.
>
> The product is a folderish object which contains 3 subfolders, each of
> which contains a specific type of object. The structure looks
> something like this:
> work/: Main folder, UI, etc
>jobs/: List of all jobs
>projects/:
>taskforces/:
>
> Each folder contains a job, project or taskforce object, as well as
> the UI to manage them.

> Now, the difficulty. I'm working on the UI for the job add form, which
> is in work/jobs. The form needs to iterate over the contents of
> projects/ and taskforces/, and I can't figure out how. Here's what
> I've tried:

___
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 )




[Zope] DTML difficulties

2001-01-30 Thread Nolan Darilek

I'm working on my first zope product and, while everything has gone
relatively smoothly so far, I'm having some issues.

The product is a folderish object which contains 3 subfolders, each of
which contains a specific type of object. The structure looks
something like this:
work/: Main folder, UI, etc
   jobs/: List of all jobs
   projects/:
   taskforces/:

Each folder contains a job, project or taskforce object, as well as
the UI to manage them.

Projects and taskforces are simple objects with names, descriptions,
etc. Logic will be attached to these classes so that, when instances
are viewed, they will search for jobs which are assigned to them. Each
job can be assigned to multiple projects/taskforces.

Now, the difficulty. I'm working on the UI for the job add form, which
is in work/jobs. The form needs to iterate over the contents of
projects/ and taskforces/, and I can't figure out how. Here's what
I've tried:


Taskforces










Projects










And the error I get is:

||Error Type: TypeError  |
||Error Value: unsliceable object|

Traceback (innermost last):
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/lib/zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: ESPWorkRequestAdd)
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: ESPWorkRequestAdd)
  File /usr/lib/zope/lib/python/App/special_dtml.py, line 120, in __call__
(Object: ESPWorkRequestAdd)
  File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__
(Object: ESPWorkRequestAdd)
  File /usr/lib/zope/lib/python/DocumentTemplate/DT_In.py, line 672, in renderwob
(Object: PARENTS[1].taskforces)
  File /usr/lib/zope/lib/python/OFS/ObjectManager.py, line 617, in __getitem__
(Object: RoleManager)
  File /usr/lib/zope/lib/python/OFS/ObjectManager.py, line 257, in _getOb
(Object: RoleManager)
TypeError: (see above)


Can anyone offer any advice? 

___
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 )