Ken,

Take a look at the DefaultProperty meta data tag.

Any object represented as a tag, visual or not, can be made to accept 
children. Those children can be explicitly placed into a property, or 
implicitly via this meta data tag.

You may want to look at how DataGrid accepts its dataProvider by 
default or how it can accept an array of columns. Even though this is 
a visual component, it really doesn't make a difference for what (I 
believe) you are looking for..

cheers,
Mike

--- In [email protected], "k2tam" <[EMAIL PROTECTED]> wrote:
>
> How does one implement nested nonvisual components in AS3?  For
> example, the  HTTPService component (the one in the mxml package)
> allows the following syntax:
> 
> <mx:HTTPService>
>  <mx:request>
>  //... e.g. some XML
>  </mx:request>
> </mx:HTTPService>
> 
> The docs for mx.rpc.http.mxml.HTTPService say that it implements
> IMXMLObject and IXMLObjectSupport, which basically gives me the
> "initialized" callback when my properties are set, but there's 
nothing
> that discusses defining, validating, or accessing nested
> components/elements.  I can't even find distinct documentation for
> <mx:request>.
> 
> In the absence of nesting, anyone have thoughts on best practices 
for
> hooking up related nonvisual components?  Right now I am linking 
them
> by passing around IDs and using document[<id of dependency>] inside
> the initialized method, but it's definitely a bit hacky.  At minimum
> it would be nice to require that a property be set (semantically
> modelling a required dependency).. is that possible?
> 
> cheers,
> ken
>


Reply via email to