[Zope] Problem Creating Instances Mysteriously Solved
Chris Withers
chrisw@nipltd.com
Sat, 20 Apr 2002 23:24:56 +0100
Dan Shafer wrote:
>
> Clearing could be a structured document (XML), a collection of SQL database
> records or, as it turns out after only a little experimentation on my part,
> a collection of folderish Zope objects and documents manipulated directly
> through DTML (setting properties, etc.)
No! *slap* *slap* Dammit! Snap out of it! ;-)
DTML is evil. Especially when used for manipulating things.
DTML should _only_ ever be used for presentation, althought I'd recommend ZPT
for that.
Use Python in the form of Script (Python)'s when you need to manipulate
things...
> IOW, no need for custom classes, just extend the built-in classes via
> properties which can be set in DTML methods and Python scripts.
tada! :-)
> This is clearly no less OO than my original approach, but it will be
> several orders of magnitude easier to write and maintain. I'll probably
> finish this project now in about 10%of the time I've already spent just
> trying to get ZClasses working to my satisfaction.
>
> Lesson learned. If it seems too hard, it probably is.
tada! (II)
> Thanks to Chris Weathers,
*sigh* Withers, not Whithers, certainly not Weathers...
Pretty please? :-)
Seriously though, I'm glad things are looking up. So many problems are merely
the outlook you bring to them...
good luck,
Chris (Withers ;-)