|
You're missing the namespace to map
mx:
Put that in your root tag.
----- Original Message -----
Sent: Thursday, July 06, 2006 12:51 PM
Subject: [flexcoders] Re: How to properly subclass a component using
mxml
One guess I have is that there are issues regarding using mxml to
populate an *inherited* field. In this case "columns" is not a component, but a
field which contains an Array of of DataGridColumn
objects. But the error that flex gives indicates that it thinks "columns" is
supposed to be a compoent because the error message is "could not resolve
<mx:columns> to a component implementation."
Is it just the fact
that columns doesnt have a capital letter that should tell the compiler that
this is a field and not a component? Should it just be looking first for fields
first and then components?
This seems like a relatively basic issue.
Someone out there must know!?
Hank
On 7/6/06, hank
williams <[EMAIL PROTECTED]>
wrote:
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
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___
|