Re: [Zope] Whitespace in lines property

2000-09-07 Thread Evan Gibson

On Thu, Sep 07, 2000 at 07:46:57AM +0200, Tino Wildenhain wrote:
here marks your whitespaces.
  
   try:
  
   textarea name="alt_names:lines" rows="10" cols="50" 
   dtml-in alt_namesdtml-let cur_item=sequence-itemdtml-var
   "_.string.strip(cur_item)"
   /dtml-let/dtml-in/textarea
  
   Ugly code, but...
  
  Well, "realize something NEW everyday!"
  It never crossed my mind that the space between my code elements
  would be rendered. DUH!
 
 Hehe ;) I'm currently playing with a clean-up tag, to remove
 whitespaces/empty 
 lines in code. May be I release it, if its fully done. Stay tuned ;-)

I used to get bitten an awful lot by doing:

dtml-if
   dtml-var standard_html_header
dtml-else
   dtml-var other_header
/dtml-if

This would cause the spaces to appear _before_ the header information
and actually just come up with error messages.
Took me some very frustrating hours to realise I just had to get rid
of the spaces and format things really badly to fix it.

 Regards
 Tino

-- 
  Evan ~ThunderFoot~ Gibson~ nihil mutatem, omni deletum ~
All of us are God's creatures... just some are more creature than others.

___
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] Whitespace in lines property

2000-09-07 Thread Tino Wildenhain

Hi Tim,

Tim Cook wrote:
 
 Tino Wildenhain wrote:
 
  Hi Tim,
 
  Tim Cook wrote:
  
   Can anyone tell me why when I edit a lines property I get leading
   whitespace inserted?
   The first line gets seven  each one after that gets 10 spaces.
  
   I tried stripping it out but this didn't seem to have any effect.
  
   ...
  
   textarea name="alt_names:lines" rows="10" cols="50" 
   dtml-in alt_names
 dtml-let cur_item=sequence-item
   ^^^ here^here
   dtml-var "_.string.strip(cur_item)"
   ^ here^here
 /dtml-let
   ^^^here   ^ here
 
   /dtml-in
   /textarea
  
   here marks your whitespaces.
 
  try:
 
  textarea name="alt_names:lines" rows="10" cols="50" 
  dtml-in alt_namesdtml-let cur_item=sequence-itemdtml-var
  "_.string.strip(cur_item)"
  /dtml-let/dtml-in/textarea
 
  Ugly code, but...
 
 
 Well, "realize something NEW everyday!"
 It never crossed my mind that the space between my code elements
 would be rendered. DUH!

Hehe ;) I'm currently playing with a clean-up tag, to remove
whitespaces/empty 
lines in code. May be I release it, if its fully done. Stay tuned ;-)

Regards
Tino

___
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] Whitespace in lines property

2000-09-06 Thread Tim Cook

Can anyone tell me why when I edit a lines property I get leading
whitespace inserted?
The first line gets seven  each one after that gets 10 spaces.

I tried stripping it out but this didn't seem to have any effect.

...

textarea name="alt_names:lines" rows="10" cols="50" 
dtml-in alt_names
  dtml-let cur_item=sequence-item
dtml-var "_.string.strip(cur_item)"
  /dtml-let
/dtml-in
/textarea

...

Thanks,
-- Tim Cook --
FreePM Project Coordinator http://www.freepm.org
OS Health Care Alliance Supporter http://www.oshca.org

___
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] Whitespace in lines property

2000-09-06 Thread Tino Wildenhain

Hi Tim,

Tim Cook wrote:
 
 Can anyone tell me why when I edit a lines property I get leading
 whitespace inserted?
 The first line gets seven  each one after that gets 10 spaces.
 
 I tried stripping it out but this didn't seem to have any effect.
 
 ...
 
 textarea name="alt_names:lines" rows="10" cols="50" 
 dtml-in alt_names
   dtml-let cur_item=sequence-item
 ^^^ here^here
 dtml-var "_.string.strip(cur_item)"
 ^ here^here
   /dtml-let
 ^^^here   ^ here  

 /dtml-in
 /textarea
 
 here marks your whitespaces.

try: 

textarea name="alt_names:lines" rows="10" cols="50" 
dtml-in alt_namesdtml-let cur_item=sequence-itemdtml-var
"_.string.strip(cur_item)"
/dtml-let/dtml-in/textarea


Ugly code, but...

HTH
Tino

___
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] Whitespace in lines property

2000-09-06 Thread Tim Cook

Tino Wildenhain wrote:
 
 Hi Tim,
 
 Tim Cook wrote:
 
  Can anyone tell me why when I edit a lines property I get leading
  whitespace inserted?
  The first line gets seven  each one after that gets 10 spaces.
 
  I tried stripping it out but this didn't seem to have any effect.
 
  ...
 
  textarea name="alt_names:lines" rows="10" cols="50" 
  dtml-in alt_names
dtml-let cur_item=sequence-item
  ^^^ here^here
  dtml-var "_.string.strip(cur_item)"
  ^ here^here
/dtml-let
  ^^^here   ^ here
 
  /dtml-in
  /textarea
 
  here marks your whitespaces.
 
 try:
 
 textarea name="alt_names:lines" rows="10" cols="50" 
 dtml-in alt_namesdtml-let cur_item=sequence-itemdtml-var
 "_.string.strip(cur_item)"
 /dtml-let/dtml-in/textarea
 
 Ugly code, but...
 

Well, "realize something NEW everyday!" 
It never crossed my mind that the space between my code elements
would be rendered. DUH!

Thanks,
-- Tim Cook --
FreePM Project Coordinator http://www.freepm.org
OS Health Care Alliance Supporter http://www.oshca.org

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