Extending component with code behind
hi,
i have read article extending components code behind: http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/
i have question that. maybe can me.
example:
{components/cartclass.as}
package components
{
public class cartclass extends datagrid
{
public function cartclass()
{
super();
}
}
}
{components/cart.mxml}
<?xml version="1.0" encoding="utf-8"?>
<shop:cartclass xmlns:mx=" http://www.adobe.com/2006/mxml"
xmlns:shop="components.*"
>
</shop:cartclass>
everthing works fine when add:
<mx:columns>
<mx:datagridcolumn headertext="title" />
</mx:columns>
between shop:cartclass tag, flex says:
could not resolve <mx:columns> component implementation
anyone knows why?
i have read article extending components code behind: http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/
i have question that. maybe can me.
example:
{components/cartclass.as}
package components
{
public class cartclass extends datagrid
{
public function cartclass()
{
super();
}
}
}
{components/cart.mxml}
<?xml version="1.0" encoding="utf-8"?>
<shop:cartclass xmlns:mx=" http://www.adobe.com/2006/mxml"
xmlns:shop="components.*"
>
</shop:cartclass>
everthing works fine when add:
<mx:columns>
<mx:datagridcolumn headertext="title" />
</mx:columns>
between shop:cartclass tag, flex says:
could not resolve <mx:columns> component implementation
anyone knows why?
you'll need use shop instead of mx when doing mx:columns. because you've done shop:cartclass, using shop namespace , using mx:columns not refer shop:cartclass columns properties, rather mx:cartclass doesn't exist.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment