From: Kevin A. <ka...@us...> - 2004-05-13 02:40:32
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14435 Modified Files: widget.py Log Message: refactored resourceEditor to query component spec for default set of attributes in on_componentAdd_command updated all components and Widget class to provide defaults Index: widget.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/widget.py,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** widget.py 12 May 2004 20:41:35 -0000 1.131 --- widget.py 13 May 2004 02:40:23 -0000 1.132 *************** *** 38,41 **** --- 38,48 ---- attributes.update(subclassAttributes) component.ComponentSpec.__init__( self, name, parent, events, attributes ) + + def getMinimalResourceDict(self, name): + """ + Class method that returns the minimal resource dictionary needed to create a component. + The spec will provide the optional attributes when the Resource is created. + """ + return {'type':self.getName(), 'name':name} |