Title: TileList problem Post by: rreyes on August 06, 2008, 02:21:15 Hi
I am having problems creating my first custom component with PureMVC. It is a menu that uses both Accordions and TileLists. I have it almost working, but for some strange reason, I can't make the items from the ItemList selectable. I already made a similar menu without using PureMVC and I have it working already. I am attaching the source code. Please help. Rodrigo ??? Title: Re: TileList problem Post by: Lothiack on August 06, 2008, 03:47:35 Could you be a little more specific? Most people in foruns don´t have the time to look thru all your code just to find what is wrong with it.
Try posting only the parts you think may have a problem. Title: Re: TileList problem Post by: rreyes on August 07, 2008, 08:11:56 Sure I can be. Sorry.
This may not be a PureMVC problem but I am not sure. I have a MenuProxy which loads the Menu Value objects. The ViewPrepCommand inyects the Proxy info into the Menu Component and this is what happens: 1) The MenuComponent creates a new MenuGroup (AccordionPanel) for each MenuGroupVO <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:ns1="com.corbitecso.cegacorp.cegacontrol.flex.view.components.*"> 2) The MenuGroup contains a TileList which gets populated with the info of the MenuItems contained in the MenuGroup. <?xml version="1.0" encoding="utf-8"?> 3) Finally, here is the itemRender code. <?xml version="1.0" encoding="utf-8"?> I really don't know what is happening. Maybe is because I am creating dinamicly the accordions and TileLists. I have seen lots of posts about people having problems trying TileList not to show selection. Mine is the exact opposite :) Thanks again... Rodrigo Title: Re: TileList problem Post by: Lothiack on August 07, 2008, 08:48:19 I don´t get it. I just tried your source here and all seems well.
Check the image I attached and see if that´s "selected". I´m a "PureAS3" guy so I don´t know this mxml and components stuff very well. :D <edit> Testing again I noticed that I can select any combination in the list, but can´t deselect them. I don´t know if that´s the intention, but it´s what´s happening here. Title: Re: TileList problem Post by: rreyes on August 07, 2008, 08:57:22 Lothiack
Thanx for your help. I already figured it out. You need to call super.data = value; at the itemRender set data(value:Object) function in order to have selection working. What you saw was a selection mecanism I was trying to program myself since the other one was not working :) Here is the correct code: override public function set data(value:Object):void { Hope this helps someone (or even you). And thanx again... Rodrigo Title: Re: TileList problem Post by: Lothiack on August 07, 2008, 09:10:42 Well, good luck with your project.
I hope I can be more helpfull next time. |