Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def PythonCard-0.8.1::component::ComponentFactory::createComponent (   self,
  aScriptable,
  aParent,
  aResource 
)

Find the class object based on a component's Resource definition.

Definition at line 289 of file component.py.

00289                                                                  :
        """
        Find the class object based on a component's Resource definition.
        """
            
        # KEA 2001-08-05 is there a better way of coming up with 
        # the module name for model as the package name changes?
        
        reggie = registry.Registry.getInstance()
        clazz = reggie.getComponentClass( aResource.__dict__['type'] )
                
        # Construct a new Component.
    
        component = clazz( aParent, aResource )

        # KEA 2004-04-20
        # this is for Widget to do
        #component.initialize()
        
        # Bind the Component to an EventDispatch that will translate
        # events generated by Component into calls to handlers that
        # are defined in a Scriptable object.
    
##        event.EventDispatch(component, aScriptable)


Generated by  Doxygen 1.6.0   Back to index