Re: [Zope] _.getitem() was:Getting an object from it's id

2001-01-23 Thread Tim Cook

Chris Withers wrote:
> 
> Tim Cook wrote:
> >
> > I use getitem() quite alot and never set the flag (therefore it's
> > false). It works and does what I want, but the ZQR entry doesn't
> > seem to support that and I have seen it given as an example with
> > the flag set true with what appears to me to be the same results.
> 
> ...it can quite often be, but try this:
> 
> if mymethod is a DTML method:
> 
> _.getitem('mymethod') will return a DTML Method object.
> 
> _.getitem('mymethod',1) will return a lump of text.
> 

It does, thanks.
See, simple answers for simple minds. 


-- Tim Cook, President --
Free Practice Management,Inc. | http://www.FreePM.com Office:
(901) 884-4126
"Liberty has never come from the government." - Woodrow Wilson

___
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] _.getitem() was:Getting an object from it's id

2001-01-23 Thread Chris Withers

Tim Cook wrote:
> 
> I use getitem() quite alot and never set the flag (therefore it's
> false). It works and does what I want, but the ZQR entry doesn't
> seem to support that and I have seen it given as an example with
> the flag set true with what appears to me to be the same results.

...it can quite often be, but try this:

if mymethod is a DTML method:

_.getitem('mymethod') will return a DTML Method object.

_.getitem('mymethod',1) will return a lump of text.


HTH,

Chris

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