Also, the specific error message is "could not resolve <mx:columns> to a component implementation."
It provides the same error message when trying to add a dataprovider too.
Hank
This is just a shot in the dark:
Does your subclass of DataGrid have any children defined? I've never come across this myself, but I've read in various places that if a component has children in its definition, it's not possible to add children when instantiating it.
Tobias.
From: [email protected] [mailto:[email protected]] On Behalf Of hank williams
Sent: Thursday, July 06, 2006 7:50 AM
To: [email protected]
Subject: [flexcoders] How to properly subclass a component using mxml
I want to create a subclass of DataGrid. So far what I have done is to create a new MXML component that is based on DataGrid.
The problem is that if I try to use the new component as if it was a dataGrid, certain things dont work. For example:
<myComp:BetterDataGrid>
<mx:columns>
<mx:DataGridColumn headerText="Song Name" dataField="label"/>
<mx:DataGridColumn headerText="Artist" dataField="label"/>
</mx:columns>
</myComp:BetterDataGrid>
in the above example, it doesnt like me using the columns construct to define the columns. In order to define columns in this way I need to put then in the actual BetterDataGrid component as opposed to in this instance. This makes it doggone hard to use BetterDataGrid as a generic "better dataGrid" since I cannot define its behavior on an instance by instance basis.
I am sure what I am doing wrong here is simple, but I dont know what.
Any insight appreciated.
Hank
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

