I have noticed others asking questions similar to this, but have not seen an answer. It seems that it is not possible to change the properties of a newly cloned zClass within the same DTML in one click. Common sentiment seems to think that the newly created object is not yet set down or commited. Is there any way to force a commit, maybe using dtml-try, or an external method, or something? Thanks, Cayce ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
On Wed, 13 Oct 1999, Cayce Ullman wrote:
I have noticed others asking questions similar to this, but have not seen an answer. It seems that it is not possible to change the properties of a newly cloned zClass within the same DTML in one click. Common sentiment seems to think that the newly created object is not yet set down or commited. Is there any way to force a commit, maybe using dtml-try, or an external method, or something?
The Transaction mechanism registers a global method get_transaction. In regular python you could do something like: get_transaction().commit() to commit the trnasaction. However I am not sure how this would interfere with Zope's automatic transaction management. I think you should need at least an immediate: get_transaction().begin() after the commit as Zope will automatically commit again at the end of the request. Pavlos
At 04:41 14/10/99 , Cayce Ullman wrote:
I have noticed others asking questions similar to this, but have not seen an answer. It seems that it is not possible to change the properties of a newly cloned zClass within the same DTML in one click. Common sentiment seems to think that the newly created object is not yet set down or commited. Is there any way to force a commit, maybe using dtml-try, or an external method, or something?
Absolute nonsense. Within your thread, all changes you make are immediatly visible, no commit is needed. If you have problems changing a newly created ZClass instances properties, then the problem lies elsewhere. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (3)
-
Cayce Ullman -
Martijn Pieters -
Pavlos Christoforou