New class in 2.5

there was an example given to add a new panel and buttons to an existing butons or properites window in blender

but for this we add to make a new class for the panel and the button

why do we have to create a new classes to do that ?

i mean i tough that a class is an object by definition and is used to create objects
so a class is like a template to create objects and then you can use the fileds and methods defined in the class for the newly created objects

but here we need to create new class to do that why not use the existing class in blender
cause theses must already exist to create all the panel and buttons ?



You can probably do it without creating a new class by modifying an instance of the base class instead. Be a big hassle and require a lot of extra work on the part of the python interpreter to do it every time the menu needs to be updated instead of looking up the new class on the heap but if you really wanted to…