Its a feature. use the "Orphan" attribute to get rid of it: <dtml-in foo size=5 start=start_point orphan=0> regards Max M
From: Kerekes Lajos [mailto:lkerekes@xperts.hu]
I use <dtml-in foo size=5 start=start_point>. For example if the start_point=5 and the length of the foo's tuple is 13, then everything is ok. I get 5 item. But if the length of the foo's tuple is 12, then I get all 7 item remains in the tuple. It works wrong if the length of the remaing part of the list is lesser than size+size/2. Anybody knows about it?
Thanks.
Lajos
_______________________________________________ Zope maillist - Zope@zope.org 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 )
Max Møller Rasmussen wrote:
Its a feature.
use the "Orphan" attribute to get rid of it:
<dtml-in foo size=5 start=start_point orphan=0>
Given the problems this 'features' causes, I'd say the fact that orphan's default value isn't 0 is a bug! Chris
OTOH it is documented in the DTML ref. section of the Zope Book therefore arguably more a case of RTFM... ;-) cheers, Garry On 9 Aug 2001, at 13:40, Chris Withers wrote: From: Chris Withers <chrisw@nipltd.com> Organization: New Information Paradigms To: Max Møller Rasmussen <maxm@normik.dk> Copies to: "'Kerekes Lajos'" <lkerekes@xperts.hu>, zope@zope.org Subject: Re: [Zope] Is this a feature or a bug Date sent: Thu, 09 Aug 2001 13:40:39 +0100
Max Møller Rasmussen wrote:
Its a feature.
use the "Orphan" attribute to get rid of it:
<dtml-in foo size=5 start=start_point orphan=0>
Given the problems this 'features' causes, I'd say the fact that orphan's default value isn't 0 is a bug!
Chris
_______________________________________________ Zope maillist - Zope@zope.org 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 )
+-------------------------------------------+ Garry Steedman mailto:gs@styrax.com Styrax Associates http://www.styrax.com/ "The Good Man has no shape." +-------------------------------------------+
* Garry Steedman <gs@styrax.com> [010809 14:04]:
OTOH it is documented in the DTML ref. section of the Zope Book therefore arguably more a case of RTFM... ;-)
Is it? I couldn't find any reference to the default value of the orphan attribute in the ZB ref. seb
Max Møller Rasmussen wrote:
Its a feature.
use the "Orphan" attribute to get rid of it:
<dtml-in foo size=5 start=start_point orphan=0>
Given the problems this 'features' causes, I'd say the fact that orphan's default value isn't 0 is a bug!
The default value is 3. The online help will be updated in the next Zope release. Andreas ----- Original Message ----- From: "seb bacon" <seb@jamkit.com> To: "Garry Steedman" <gs@styrax.com> Cc: "Chris Withers" <chrisw@nipltd.com>; "'Kerekes Lajos'" <lkerekes@xperts.hu>; <zope@zope.org> Sent: Montag, 13. August 2001 05:54 Subject: Re: [Zope] Is this a feature or a bug
* Garry Steedman <gs@styrax.com> [010809 14:04]:
OTOH it is documented in the DTML ref. section of the Zope Book therefore arguably more a case of RTFM... ;-)
Is it? I couldn't find any reference to the default value of the orphan attribute in the ZB ref.
seb
Max Møller Rasmussen wrote:
Its a feature.
use the "Orphan" attribute to get rid of it:
<dtml-in foo size=5 start=start_point orphan=0>
Given the problems this 'features' causes, I'd say the fact that orphan's default value isn't 0 is a bug!
_______________________________________________ Zope maillist - Zope@zope.org 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 )
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
The default value is 3. The online help will be updated in the next Zope release.
I know we've covered this before, but the default value *should* be 0. With this question having popped up so many times in the last year plus, I'm not sure why ZC hasn't changed it. I noticed that this request is now "Pending" in collector #2468. If votes count for anything, I vote for zero. _______________________ Ron Bickers Logic Etc, Inc.
<snip confusion about the value of orphan attribute>
The default value is 3. The online help will be updated in the next Zope release.
I know we've covered this before, but the default value *should* be 0. With this question having popped up so many times in the last year plus, I'm not sure why ZC hasn't changed it. I noticed that this request is now "Pending" in collector #2468. If votes count for anything, I vote for zero.
At the risk of adding unecessary noise to the list: Me too. I can't see how changing this will actually break anything, though it may mess up some layout. It's so counterintuitive, it's like being given a bike to ride and then somebody telling you after two hours of you falling off, 'oh yeah, you can't ride it *forwards*, unless you press this switch under the mudguard.' At least, that's how I felt about it the first time I spent a day trying to work out what was going on. seb
I changed the default value to 0. The changes are now in the CVS. Andreas ----- Original Message ----- From: "seb bacon" <seb@jamkit.com> To: "Ron Bickers" <rbickers-dated-998312597.e081cc@logicetc.com> Cc: <zope@zope.org> Sent: Dienstag, 14. August 2001 13:09 Subject: [Zope] The orphans=3 feature: votes for/against?
<snip confusion about the value of orphan attribute>
The default value is 3. The online help will be updated in the next Zope release.
I know we've covered this before, but the default value *should* be 0.
With
this question having popped up so many times in the last year plus, I'm not sure why ZC hasn't changed it. I noticed that this request is now "Pending" in collector #2468. If votes count for anything, I vote for zero.
At the risk of adding unecessary noise to the list:
Me too.
I can't see how changing this will actually break anything, though it may mess up some layout. It's so counterintuitive, it's like being given a bike to ride and then somebody telling you after two hours of you falling off, 'oh yeah, you can't ride it *forwards*, unless you press this switch under the mudguard.' At least, that's how I felt about it the first time I spent a day trying to work out what was going on.
seb
_______________________________________________ Zope maillist - Zope@zope.org 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 )
seb bacon wrote:
<snip confusion about the value of orphan attribute>
The default value is 3. The online help will be updated in the next Zope release.
I know we've covered this before, but the default value *should* be 0. With this question having popped up so many times in the last year plus, I'm not sure why ZC hasn't changed it. I noticed that this request is now "Pending" in collector #2468. If votes count for anything, I vote for zero.
At the risk of adding unecessary noise to the list:
Me too.
I can't see how changing this will actually break anything, though it may mess up some layout. It's so counterintuitive, it's like being given a bike to ride and then somebody telling you after two hours of you falling off, 'oh yeah, you can't ride it *forwards*, unless you press this switch under the mudguard.' At least, that's how I felt about it the first time I spent a day trying to work out what was going on.
seb
I agree, this "feature" is needless newbie hair-pulling fodder. and is especially insidious since <dtml-in "foo" size="1"> actually works as expected a lot of the time, but will bite you where it counts when you're not looking. Everytime I teach a Zope class, people comment about this. I usually throw in: "Just be glad overlap doesn't default to -1" think about it 8^) A slightly more graceful fix (which has been suggested before), which would break less code would be for orphan to default to size-1 with a maximum of 3. Although this might even be *more* confusing. There are lots of things wrong with dtml-in. Hows about we just deprecate the whole damn thing and start over?!? Seriously. -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
I can't see how changing this will actually break anything, though it may mess up some layout. It's so counterintuitive, it's like being given a bike to ride and then somebody telling you after two hours of you falling off, 'oh yeah, you can't ride it *forwards*, unless you press this switch under the mudguard.' At least, that's how I felt about it the first time I spent a day trying to work out what was going on.
You spent a full day figuring that out too? Glad I'm not the only one; not to make lite of you. For me, it was hard justifiying to my employer why it took me a full day just to get a simple batch loop to work. (Obviously, I must have sid something right though, because I'm still here! **Whew**) I vote for the default of zero. Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
participants (9)
-
Andreas Jung -
Casey Duncan -
Chris Withers -
Garry Steedman -
Kerekes Lajos -
Max Møller Rasmussen -
Ron Bickers -
seb bacon -
Tommy Johnson