[flexcoders] Menubar Render
Hi folks, I had create a MenuBar (copy from LiveDoc's exemple) and set a custom menuBarItemRenderer. But when I tried to run I got a runtime error, every time I put the cursor over the render. Error: > TypeError: Error #1034: Type Coercion failed: cannot convert > mx.core::[EMAIL PROTECTED] to > mx.controls.menuClasses.IMenuBarItemRenderer. > > at mx.controls::MenuBar/mouseOverHandler > ()[E:\dev\flex_201_borneo\sdk\frameworks\mx\controls\MenuBar.as:1670] > Menubar (MenuBarLiveDocsExample.mxml): > > > http://www.adobe.com/2006/mxml"; > creationComplete="initCollections();" > > > > > > > paddingTop="10" paddingLeft="10"> > > text="Select a menu item."/> > > dataProvider="{menuBarCollection}" > menuBarItemRenderer="MyCustomRender"/> > > > > Item Render (MyCustomRender.mxml): > > http://www.adobe.com/2006/mxml"; > implements="mx.controls.menuClasses.IMenuBarItemRenderer" > > > > > > > > > > > > > Any one knows how to solve this? VELO
RE: [flexcoders] Menubar Render
Try setting mouseEnabled and/or mouseChildren=false on the label and other children. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Marvin Froeder Sent: Wednesday, December 05, 2007 10:55 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Menubar Render Hi folks, I had create a MenuBar (copy from LiveDoc's exemple) and set a custom menuBarItemRenderer. But when I tried to run I got a runtime error, every time I put the cursor over the render. Error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.core::[EMAIL PROTECTED] to mx.controls.menuClasses.IMenuBarItemRenderer. at mx.controls::MenuBar/mouseOverHandler()[E:\dev\flex_201_borneo\sdk\frame works\mx\controls\MenuBar.as:1670] Menubar (MenuBarLiveDocsExample.mxml): http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " creationComplete="initCollections();" > Item Render (MyCustomRender.mxml) : http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " implements="mx.controls.menuClasses.IMenuBarItemRenderer " > Any one knows how to solve this? VELO
Re: [flexcoders] Menubar Render
Hi Alex, Your suggestion had helped to solve this RTE issue with MenuBarRenderer that contains at least one mx:Label instance. But for this particular case of the renderer that contains only text information, I would encourage to use labelFunction instead together with MenuBar. Here is the link to the nice hands on example of using labelFunction together with Tree that gives the idea: http://blog.flexexamples.com/2007/10/29/defining-a-custom-label-function-on-a-flex-tree-control/ On 10/12/2007, Alex Harui <[EMAIL PROTECTED]> wrote: > >Try setting mouseEnabled and/or mouseChildren=false on the label and > other children. > > -- > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Marvin Froeder > *Sent:* Wednesday, December 05, 2007 10:55 AM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Menubar Render > > Hi folks, > > I had create a MenuBar (copy from LiveDoc's exemple) and set a custom > menuBarItemRenderer. > > But when I tried to run I got a runtime error, every time I put the cursor > over the render. > > Error: > > > TypeError: Error #1034: Type Coercion failed: cannot convert > > mx.core::[EMAIL PROTECTED] to > > mx.controls.menuClasses.IMenuBarItemRenderer. > > > > at mx.controls::MenuBar/mouseOverHandler > > ()[E:\dev\flex_201_borneo\sdk\frameworks\mx\controls\MenuBar.as:1670] > > > > Menubar (MenuBarLiveDocsExample.mxml): > > > > > > > http://www.adobe.com/2006/mxml"; > > creationComplete="initCollections();" > > > > > > > > > > > > > > paddingTop="10" paddingLeft="10"> > > > > >text="Select a menu item."/> > > > > > dataProvider="{menuBarCollection}" > > menuBarItemRenderer="MyCustomRender"/> > > > > > > > > > > Item Render (MyCustomRender.mxml) : > > > > > http://www.adobe.com/2006/mxml"; > > implements="mx.controls.menuClasses.IMenuBarItemRenderer " > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any one knows how to solve this? > > > VELO > > > -- -- Med venlig hilsen / Best regards Andriy Panas [EMAIL PROTECTED]
Re: [flexcoders] Menubar Render
I my case I need to put 2 icons and a label I believe the only way is the render. VELO On Wed, Dec 12, 2007 at 4:48 PM, Andriy Panas <[EMAIL PROTECTED]> wrote: > > > > > > > Hi Alex, > > Your suggestion had helped to solve this RTE issue with MenuBarRenderer that > contains at least one mx:Label instance. > > But for this particular case of the renderer that contains only text > information, I would encourage to use labelFunction instead together with > MenuBar. > > Here is the link to the nice hands on example of using labelFunction > together with Tree that gives the idea: > > http://blog.flexexamples.com/2007/10/29/defining-a-custom-label-function-on-a-flex-tree-control/ > > > > > > On 10/12/2007, Alex Harui < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > Try setting mouseEnabled and/or mouseChildren=false on the label and other > children. > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Marvin Froeder > > Sent: Wednesday, December 05, 2007 10:55 AM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Menubar Render > > > > > > > > > > > > > > Hi folks, > > > > I had create a MenuBar (copy from LiveDoc's exemple) and set a custom > menuBarItemRenderer. > > > > But when I tried to run I got a runtime error, every time I put the cursor > over the render. > > > > Error: > > > > > > > > > > > TypeError: Error #1034: Type Coercion failed: cannot convert > mx.core::[EMAIL PROTECTED] to > mx.controls.menuClasses.IMenuBarItemRenderer. > > > > > > at > mx.controls::MenuBar/mouseOverHandler()[E:\dev\flex_201_borneo\sdk\frameworks\mx\controls\MenuBar.as:1670] > > > > > > > > Menubar (MenuBarLiveDocsExample.mxml): > > > > > > > > > http://www.adobe.com/2006/mxml"; > creationComplete="initCollections();" > > > > > > > > > > > > > > > > > > > > > paddingTop="10" paddingLeft="10"> > > > > > > > >text="Select a menu item."/> > > > > > > > > dataProvider="{menuBarCollection}" > menuBarItemRenderer="MyCustomRender"/> > > > > > > > > > > > > > > > > > > > > > > > > Item Render (MyCustomRender.mxml ) : > > > > > > > > > > > > http://www.adobe.com/2006/mxml"; > > > implements="mx.controls.menuClasses.IMenuBarItemRenderer " > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any one knows how to solve this? > > > > > > VELO > > > > > > > > > > > > > > > > > > -- > -- > Med venlig hilsen / Best regards > Andriy Panas > [EMAIL PROTECTED]