Re: [Zope] dtml-tree question

2000-08-30 Thread Hugo Ramos

- Original Message - 
From: "Dieter Maurer" [EMAIL PROTECTED]
To: "Hugo Ramos" [EMAIL PROTECTED]
Sent: Wednesday, August 30, 2000 6:14 PM
Subject: Re: [Zope] dtml-tree question


 Hugo Ramos writes:
   line 566 (original source):
   s.append([id,[]])
 Chris Withers has been hit by this bug, too.
 
 Maybe, he found a patch/workaround by now.
 
 I never saw this problem, but, up to now, used the tree tag
 only in Zope 2.1.x.


I have that error all the time if I use the dtml-tree tag inside a ZClass.

regards

=
Hugo Ramos - [EMAIL PROTECTED]
ZopersORG - http://www.zopers.org
=
Do not meddle in the affairs of programmers, for they are easy to annoy,
and have all the source code!!!


___
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-dev] Re: [Zope] dtml-tree question

2000-08-29 Thread Hugo Ramos

- Original Message -
From: "Dieter Maurer" [EMAIL PROTECTED]
To: "Hugo Ramos" [EMAIL PROTECTED]
Cc: "ZOPE" [EMAIL PROTECTED]; "EUROZOPE" [EMAIL PROTECTED]
Sent: Tuesday, August 29, 2000 10:22 PM
Subject: Re: [Zope] dtml-tree question


 Hugo Ramos writes:
   Is there a way to use my own self made '+' icon in a tree tag?
   I'dd like to use my own icon only IF i want to... and not change the
python
   source to use my own icon all the time!
 The code is partially there, but incomplete and commented out.

 If you do not mind other extensions as well, I could provide
 a TreeTag patch for several extensions, including the
 icon customization.


hello Dieter,

I've tryied to hack the treetag source already... but there's some kind of
bug in it:

line 566 (original source):
s.append([id,[]])

Why is this trying to append to 's' when 's' has become a tupple somewhere
before this line???... tupples don't accept append!!

This bug is really making me crazy... because it makes an error when
clicking the + icon in a dtml-tree that I must use...



Another thing:
I hacked the source of treetag.py to accept 2 more parameters in the
dtml-tree... icon_mi and icon_pl

The hacked source is in the attach.
Changes go from line 411-427. Of course i defined the 2 new parameters as
None in the file top.

Please somebody help me... I'm running out of ideias...

regards

=
Hugo Ramos - [EMAIL PROTECTED]
ZopersORG - http://www.zopers.org
=
Do not meddle in the affairs of programmers, for they are easy to annoy,
and have all the source code!!!


##
# 
# Zope Public License (ZPL) Version 1.0
# -
# 
# Copyright (c) Digital Creations.  All rights reserved.
# 
# This license has been certified as Open Source(tm).
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# 1. Redistributions in source code must retain the above copyright
#notice, this list of conditions, and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright
#notice, this list of conditions, and the following disclaimer in
#the documentation and/or other materials provided with the
#distribution.
# 
# 3. Digital Creations requests that attribution be given to Zope
#in any manner possible. Zope includes a "Powered by Zope"
#button that is installed by default. While it is not a license
#violation to remove this button, it is requested that the
#attribution remain. A significant investment has been put
#into Zope, and this effort will continue if the Zope community
#continues to grow. This is one way to assure that growth.
# 
# 4. All advertising materials and documentation mentioning
#features derived from or use of this software must display
#the following acknowledgement:
# 
#  "This product includes software developed by Digital Creations
#  for use in the Z Object Publishing Environment
#  (http://www.zope.org/)."
# 
#In the event that the product being advertised includes an
#intact Zope distribution (with copyright and license included)
#then this clause is waived.
# 
# 5. Names associated with Zope or Digital Creations must not be used to
#endorse or promote products derived from this software without
#prior written permission from Digital Creations.
# 
# 6. Modified redistributions of any form whatsoever must retain
#the following acknowledgment:
# 
#  "This product includes software developed by Digital Creations
#  for use in the Z Object Publishing Environment
#  (http://www.zope.org/)."
# 
#Intact (re-)distributions of any official Zope release do not
#require an external acknowledgement.
# 
# 7. Modifications are encouraged but must be packaged separately as
#patches to official Zope releases.  Distributions that do not
#clearly separate the patches from the original work must be clearly
#labeled as unofficial distributions.  Modifications which do not
#carry the name Zope may be packaged in any form, as long as they
#conform to all of the clauses above.
# 
# 
# Disclaimer
# 
#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

Re: [Zope] dtml-tree question

2000-08-29 Thread Dieter Maurer

Hugo Ramos writes:
  Is there a way to use my own self made '+' icon in a tree tag?
  I'dd like to use my own icon only IF i want to... and not change the python
  source to use my own icon all the time!
The code is partially there, but incomplete and commented out.

If you do not mind other extensions as well, I could provide
a TreeTag patch for several extensions, including the
icon customization.


Dieter

___
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-tree question

2000-08-28 Thread Hugo Ramos

Yellow ppl,

Is there a way to use my own self made '+' icon in a tree tag?
I'dd like to use my own icon only IF i want to... and not change the python
source to use my own icon all the time!

regards

=
Hugo Ramos - [EMAIL PROTECTED]
ZopersORG - http://www.zopers.org
=
Do not meddle in the affairs of programmers, for they are easy to annoy,
and have all the source code!!!


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




Re: [Zope] dtml-tree question

2000-07-31 Thread Jonothan Farr

 Jonothan Farr wrote:
  Is it because the document is at the top of the namespace stack instead of
the
  request object in the dtml document case, but not in the dtml method case?

 Hurm, thinking for the right words and I think(?) namespace is the right
 one.

 Anyway, DTML documents have one and DTML methods don't.

 Hence your tree tag is using the DTML documents namespace, which has
 nothing in it apart from the properties of the document.


I don't think that's entirely accurate. There's a lot more in the namespace of a
DTML document. I think you're right, though, in that it's a namespace issue. I
found that the results of the SQL query where not part of the namespace in the
DTML Document case, but they were in the DTML Method case. Here's how I got it
working:

dtml-var standard_html_header

dtml-tree
branches_expr="select_subprojects(project_id=REQUEST.get('project_id',0)
id=project_id

  dtml-call "REQUEST.set('project_id', project_id)"

  smalla
href="edit_project?project_id=dtml-project_id;"edit/a/smallnbsp;

  a href="view_project?project_id=dtml-project_id;"dtml-var
project_name/anbsp;/td

  td align=right valign=topdtml-var task_count

/dtml-tree

dtml-var standard_html_footer


In other words, I have to explicitly get the parameter from the result object
and pass it back into the sql query. What I'd like to know is why? Is this a bug
or a feature?

Thanks,
--jfarr



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