Goldthwaite, Joe wrote:
First I need to apologize for saying that the example comes from The Zope Book. It's actually from The Book of Zope from No Starch Press. For some reason, I keep calling it The Zope Book. Does anyone know where I can get printed copy of The Zope Book? Amazon and Barnes & Noble have it but the publish date is from 2001. Is a newer version available?
I think there hasn't been a reprint of the Zope Book (as from zope.org), even though the newer versions are much enhanced.
... I'm still having problems where changes to the DTML files in my project are not showing up in Zope. I added the refresh.txt file to the project directory but refreshing still isn't bringing in the changes. Here's an example, I have a new_EISUser.dtml file in my project\public subdirectory. Edit the file externally and change the dtml to dtmx, I can refresh the project, restart Zope, manually start and stop the Zope service, or even reboot the machine but the change doesn't not show up in Zope. If I delete my instance of the product and then restart Zope, the change comes in.
Could it be the cache isn't refreshing correctly? Or maybe it has something to do with running Zope under Windows? Is this a problem with external dtml files stored in a project?
Well, that's a different story, and I think I can explain it. DTML documents are stored as objects in Zope, as you can probably tell from the way they're used, and once created don't refer back to their on-disk sources. So you must destroy and recreate such a thing in order to see any changes. If a DTML object is stored as an attribute of the class, DTML objects with the behaviour of the filesystem code at the time of instantiation will persist in that instance. I suspect you're doing this. Create them instead as attributes of the module, which is destroyed on Zope shutdown and re-run on startup (or refresh). Or it could be your browser cache. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."