[Zope-dev] Re: On with the show....

2003-12-15 Thread Evan Simpson
Sidnei da Silva wrote:
If you look at FSPageTemplate, its obvious that it doesn't subclass
ZopePageTemplate, but the solution is not so obvious. Using:
pt_getContext = ZopePageTemplate.pt_getContext.im_func
Wow, FSPageTemplate is lousy with this sort of thing, isn't it?  I'd 
have spelled it ZopePageTemplate.__dict__['pt_getContext'], but your 
code works out to the same thing.  I don't endorse this sort of 
cross-tree method copying, but if we're going to do it on this scale, at 
least we can make it tidier.  Before the Globals.InitializeClass:

zpd = ZopePageTemplate.__dict__
for m in ('func_code', '_default_bindings', 'manage_FTPget',
  'get_size', 'PrincipiaSearchSource', 'document_src',
  'pt_getContext', 'ZScriptHTML_tryParams'):
  setattr(FSPageTemplate, m, zpd[m])
A similar error also happened with FSImage.__str__ (which is assigned
Image.__str__, but FSImage just subclasses FSObject).
Any thought on those?
Yep -- it seems very silly to copy a one-line method like that.

Cheers,

Evan @ 4-am



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: On with the show....

2003-12-15 Thread Yuppie
Sidnei da Silva wrote:
Yep. Sorry for not having checked CMF Head. BTW, Yuppie, can we get a
1.5 soon?
Maybe [EMAIL PROTECTED] is a better place for questions like that?

Today Tres Seaver wrote:
BTW, I plan to post a draft roadmap for CMF 1.5 soon (today, I hope),
and to ask for feedback.
Yuppie



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: On with the show....

2003-12-15 Thread Casey Duncan
On Mon, 15 Dec 2003 10:02:58 -0600
Evan Simpson [EMAIL PROTECTED] wrote:

 Sidnei da Silva wrote:
  If you look at FSPageTemplate, its obvious that it doesn't subclass
  ZopePageTemplate, but the solution is not so obvious. Using:
  
  pt_getContext = ZopePageTemplate.pt_getContext.im_func
 
 Wow, FSPageTemplate is lousy with this sort of thing, isn't it?  I'd 
 have spelled it ZopePageTemplate.__dict__['pt_getContext'], but your 
 code works out to the same thing.  I don't endorse this sort of 
 cross-tree method copying, but if we're going to do it on this scale, at 
 least we can make it tidier.  Before the Globals.InitializeClass:
 
 zpd = ZopePageTemplate.__dict__
 for m in ('func_code', '_default_bindings', 'manage_FTPget',
'get_size', 'PrincipiaSearchSource', 'document_src',
'pt_getContext', 'ZScriptHTML_tryParams'):
setattr(FSPageTemplate, m, zpd[m])
 
  A similar error also happened with FSImage.__str__ (which is assigned
  Image.__str__, but FSImage just subclasses FSObject).
  
  Any thought on those?
 
 Yep -- it seems very silly to copy a one-line method like that.

Smells like a broken class hierarchy to me. I really think we need to consider 
refactoring the code so this sort of sillyness isn't necessary.

-Casey

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: On with the show....

2003-12-15 Thread Tres Seaver
On Mon, 2003-12-15 at 11:51, Casey Duncan wrote:
 On Mon, 15 Dec 2003 10:02:58 -0600
 Evan Simpson [EMAIL PROTECTED] wrote:
 
  Sidnei da Silva wrote:
   If you look at FSPageTemplate, its obvious that it doesn't subclass
   ZopePageTemplate, but the solution is not so obvious. Using:
   
   pt_getContext = ZopePageTemplate.pt_getContext.im_func
  
  Wow, FSPageTemplate is lousy with this sort of thing, isn't it?  I'd 
  have spelled it ZopePageTemplate.__dict__['pt_getContext'], but your 
  code works out to the same thing.  I don't endorse this sort of 
  cross-tree method copying, but if we're going to do it on this scale, at 
  least we can make it tidier.  Before the Globals.InitializeClass:
  
  zpd = ZopePageTemplate.__dict__
  for m in ('func_code', '_default_bindings', 'manage_FTPget',
 'get_size', 'PrincipiaSearchSource', 'document_src',
 'pt_getContext', 'ZScriptHTML_tryParams'):
 setattr(FSPageTemplate, m, zpd[m])
  
   A similar error also happened with FSImage.__str__ (which is assigned
   Image.__str__, but FSImage just subclasses FSObject).
   
   Any thought on those?
  
  Yep -- it seems very silly to copy a one-line method like that.
 
 Smells like a broken class hierarchy to me. I really think we need to
 consider refactoring the code so this sort of sillyness isn't necessary.

While we are at it, we need to refactor the core bits of ZPT
(expressions, PageTemplateFile, etc.) out of 'Products.PageTemplates'
and into a better top-level pacakge.  People are beginning to use PTF
for ZMI, which shouldn't break in the absence of a product.

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  Zope Dealers   http://www.zope.com



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )