Wrong example in default ZClass constructors?
Hi all, playing around with the creation of ZClasses, I noticed that the examples given in the comments of the contructor method for new ZClasses will partly not work. I have now figured out how to get things going, but I would like your thoughts on this before reporting it. Usually, things that I find are wrong are working smoothly and it was only me who has misunderstood ;-) Here goes: the default constructor method uses the following: <dtml-with "TestClass.createInObjectManager(REQUEST['id'], REQUEST)"> and suggests to change the new instance like this: <dtml-call "propertysheets.Basic.manage_editProperties(REQUEST)"> within the <dtml-with> part. I see two problems with that: 1.) the <dtml-with> should use the 'mapping' attribute. Otherwise, neither 'propertysheets' nor 'REQUEST' are available as used in the example. 2.) Even with the mapping, I get a name error for 'Basics'. This is probably due to the line being an example only. I am not very deep into ZClasses so far, perhaps someone can set me right here. I used the following, which did fine: <dtml-call "manage_changeProperties(REQUEST)"> but changed it to <dtml-call "manage_changeProperties(title=REQUEST['title'])"> so that no random request parameters change unwanted properties. Cheers, Ben -- Ben Peter - Feldstrasse 8 - 35091 Coelbe Ben.Peter@t-online.de ph: (+49) 6421 983520
Ben Peter wrote:
Hi all,
playing around with the creation of ZClasses, I noticed that the examples given in the comments of the contructor method for new ZClasses will partly not work.
I have now figured out how to get things going, but I would like your thoughts on this before reporting it. Usually, things that I find are wrong are working smoothly and it was only me who has misunderstood ;-)
Might be the case here too??? <s> I've built several following those examples and they seem to work just fine. The word Basic needs to be replaced with the name of the propertysheet you created. If you are having trouble getting ZClasses to work as described in the various tutorials, how-tos and examples feel free to post a question with your error message(s). -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
participants (2)
-
Ben.Peter@t-online.de -
Tim Cook