Previous Chapter | Next Chapter | Up | Next Section | Contents

Creating a Simple Z Class


Start by going to the Control_Panel/Products Folder and creating a new Product. Click "Add" and specify "CDProduct" for the Product Id. Then click "Generate". You've now created a new Zope Product. Your product should be visible inside the Control_Panel/Products Folder.

Now go the "CDProduct" Product Folder and create a Z Class by selecting "Z Class" from the product add list. For the class Id specify "CDClass", and for the "Meta type" specify "CD", and make sure "Create constuctor objects." is checked. Don't worry about the "Base classes" widget for now. Click "Add", and you've just created your first Z Class.

Z Class add form

Now let's set up our newly minted CD Class. You'll notice that after you add your Z Class, Zope creates five new objects for you:

The constructor objects are created by Zope to help you create new instances of your class.

Let's look at the Z Class object. Click on the "CDClass" object inside the "CDProduct" Folder. You are presented with the "Methods" Z Class management screen. Right now our Z Class has no methods, so no method objects are listed on this screen. Now click on the "Basic" management tab. Here we can set some Z Class properties, like a class's "meta type" and icon. A "meta type" is the name of your class as it appears on the product add list. Your class's "meta type" should be "CD". The class icon can be defined here by uploading a file. You'll also notice a class id which you can safely ignore for now.

Previous Chapter | Next Chapter | Up | Next Section | Contents

Banner.Novgorod.Ru