up with PyGUI!

Ed Leafe ed at leafe.com
Fri Sep 24 16:17:06 CEST 2004


On Sep 24, 2004, at 10:01 AM, Carlos Ribeiro wrote:

> Basically what it does is to process declarations like this:
>
> class MainFrame(FrameDescription):
>
>     class b1(ButtonDescription):
>       size = (40, 40)
>       text = "b1"
>
> ... where FrameDescription and ButtonDescription are both derived from
> a base Container class. When constructed, the MainFrame will contain
> an **instance** called b1 from the class b1 (that's right, the same
> name; the temporary class definition is gone). The metaclass creation
> engine also respects the order of the declaration.

	How is this more powerful/flexible/robust than something like:

class MainForm(dabo.ui.dForm):
	def __init__(self, parent=None):
		self.addObject(ButtonDescription, "b1")
		self.b1.Size = (40,40)
		self.b1.Caption = "b1"

...which is the standard syntax in Dabo for adding objects to a form 
(frame)?

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/




More information about the Python-list mailing list