Hello Jukka, thanks for your quick, and accurate answer. I've just removed the 1st if, calling checkout() always, and left the last if calling checkin() only if newVersion is true. It works fine.
On Tue, Jul 6, 2010 at 2:35 PM, Jukka Zitting <[email protected]> wrote: > Hi, > > 2010/7/6 Fabián Mandelbaum <[email protected]>: >> So. Can I modify the code above in any way to be able to create >> versions of files as I wish, or do mix:versionable nodes must always >> have a new version created when one of its properties change? > > See the checkout() method. When you checkin() a node, a new version is > created and the node enters the "checked in" state in which it can not > be modified. Callin checkout() moves the node to a "checked out" state > where it can be modified. Only when you call checkin() again is a new > version created based on the current contents of the checked out node. > > BR, > > Jukka Zitting > -- Fabián Mandelbaum IS Engineer
