This content has been marked as final. Show 3 replies
You'll need to use shop instead of mx when doing mx:columns. Because you've done shop:CartClass, you are using shop as a namespace and so using mx:columns does not refer to the shop:CartClass columns properties, but rather the mx:CartClass that doesn't exist.
"sjerry-" <firstname.lastname@example.org> wrote in message
> I have read an article about extending components with code behind:
> I have a question about that. Maybe someone can help me.
> package components
> public class CartClass extends DataGrid
> public function CartClass()
> <?xml version="1.0" encoding="utf-8"?>
> <shop:CartClass xmlns:mx=" http://www.adobe.com/2006/mxml"
> Everthing works fine but when i add:
> <mx:DataGridColumn headerText="Title" />
> between the shop:CartClass tag, Flex says:
> Could not resolve <mx:columns> to a component implementation
columns is actually a property of the DataGrid instance, rather than the
DataGrid class itself, so it needs to be in the same namespace as the actual
<mx:DataGridColumn headerText="Title" />
I see. Thanks man. I'm just started with Flex so i have to learn a lot... :-)