RE: [flexcoders] Re: Combobox ItemRenderer is now working as expected
I think you want: visible={XML(data)[EMAIL PROTECTED] != 'false'} From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of srikanth_reddy_007 Sent: Thursday, November 15, 2007 4:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Combobox ItemRenderer is now working as expected Tried Boolean(XML(data)[EMAIL PROTECTED]) Tried Boolean([EMAIL PROTECTED]) but no luck !!! Can some body please try by running the code? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Douglas Knudsen [EMAIL PROTECTED] wrote: hmm, isn't [EMAIL PROTECTED] a String, eh? Try casting it to a Boolean. DK On Nov 14, 2007 11:45 PM, srikanth_reddy_007 [EMAIL PROTECTED] wrote: Tried XML(data)[EMAIL PROTECTED] but no luck !!! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: Are you getting binding warnings? Try XML(data)[EMAIL PROTECTED] From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of srikanth_reddy_007 Sent: Wednesday, November 14, 2007 8:08 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Combobox ItemRenderer is now working as expected Can some one rectify my problem -- I have a ItemRenderer for combobox FilterListRenderer.mxml ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=20 paddingLeft=0 paddingRight=0 paddingTop=0 paddingBottom=0 initialize=init() enabled={data.enabled} mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] [Embed(source=assets/bulletCheck.png)] public var BulletCheck:Class; [Bindable] [Embed(source=assets/bulletWarning.png)] public var BulletWarning:Class; public function init():void { } ]] /mx:Script mx:Label text={data.Name} width=190 height=20 truncateToFit=true/ mx:Button width=20 height=20 right=22 bottom=0 top=0 upIcon={BulletCheck} overIcon={BulletCheck} downIcon={BulletCheck} disabledIcon={BulletCheck} visible=[EMAIL PROTECTED] click=Alert.show([EMAIL PROTECTED])/ mx:Button width=20 height=20 right=0 bottom=0 top=0 upIcon={BulletWarning} overIcon={BulletWarning} downIcon={BulletWarning} disabledIcon={BulletWarning} visible=[EMAIL PROTECTED] click=Alert.show([EMAIL PROTECTED])/ /mx:Canvas with the above code and i call this in my main application as ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute mx:XML format=e4x id=filterData Filters Filter id=1001 NameDefault/Name Category0/Category /Filter Filter id=1002 NameNetwork Filter/Name Category0/Category /Filter Filter id=1003 NameHardware Filter/Name Category0/Category /Filter Filter id=1004 NameSoftware Filter/Name Category1/Category /Filter Filter id=1005 showEdit=false showDelete=false NameAdvanced Filter/Name Category2/Category /Filter Filter id=1006 showEdit=true showDelete=true NameMy Saved Filter/Name Category3/Category /Filter Filter id=1007 showEdit=true showDelete=true NameMy Saved Filter 1/Name Category4/Category /Filter /Filters /mx:XML mx:ComboBox id=cmbFilter itemRenderer=FilterListRenderer width=250 cornerRadius=0 rowCount=10 dataProvider={filterData.Filter} labelField=Name x=38 y=47 /mx:ComboBox /mx:Application what i expect is a combo box with the Item renderer displaying two buttons besides the label when i say showEdit=true showDelete=true in the data and doen't show these buttons if i dont give anything or if i give showEdit=false showDelete=false. But what ever i give or doent give that, it shows the buttons in the item renderer. and when i click on the button it returns me the correct value? can some body help me out in solving this problem and why its not working as i expect. -- Douglas Knudsen http://www.cubicleman.com http://www.cubicleman.com this is my signature, like it?
RE: [flexcoders] Re: Combobox ItemRenderer is now working as expected
Check your console output at runtime. Then try coercing as XML as I showed. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of srikanth_reddy_007 Sent: Wednesday, November 14, 2007 10:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Combobox ItemRenderer is now working as expected No I am not getting any warnings... --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: Are you getting binding warnings? Try XML(data)[EMAIL PROTECTED] From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of srikanth_reddy_007 Sent: Wednesday, November 14, 2007 8:08 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Combobox ItemRenderer is now working as expected Can some one rectify my problem -- I have a ItemRenderer for combobox FilterListRenderer.mxml ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=20 paddingLeft=0 paddingRight=0 paddingTop=0 paddingBottom=0 initialize=init() enabled={data.enabled} mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] [Embed(source=assets/bulletCheck.png)] public var BulletCheck:Class; [Bindable] [Embed(source=assets/bulletWarning.png)] public var BulletWarning:Class; public function init():void { } ]] /mx:Script mx:Label text={data.Name} width=190 height=20 truncateToFit=true/ mx:Button width=20 height=20 right=22 bottom=0 top=0 upIcon={BulletCheck} overIcon={BulletCheck} downIcon={BulletCheck} disabledIcon={BulletCheck} visible=[EMAIL PROTECTED] click=Alert.show([EMAIL PROTECTED])/ mx:Button width=20 height=20 right=0 bottom=0 top=0 upIcon={BulletWarning} overIcon={BulletWarning} downIcon={BulletWarning} disabledIcon={BulletWarning} visible=[EMAIL PROTECTED] click=Alert.show([EMAIL PROTECTED])/ /mx:Canvas with the above code and i call this in my main application as ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute mx:XML format=e4x id=filterData Filters Filter id=1001 NameDefault/Name Category0/Category /Filter Filter id=1002 NameNetwork Filter/Name Category0/Category /Filter Filter id=1003 NameHardware Filter/Name Category0/Category /Filter Filter id=1004 NameSoftware Filter/Name Category1/Category /Filter Filter id=1005 showEdit=false showDelete=false NameAdvanced Filter/Name Category2/Category /Filter Filter id=1006 showEdit=true showDelete=true NameMy Saved Filter/Name Category3/Category /Filter Filter id=1007 showEdit=true showDelete=true NameMy Saved Filter 1/Name Category4/Category /Filter /Filters /mx:XML mx:ComboBox id=cmbFilter itemRenderer=FilterListRenderer width=250 cornerRadius=0 rowCount=10 dataProvider={filterData.Filter} labelField=Name x=38 y=47 /mx:ComboBox /mx:Application what i expect is a combo box with the Item renderer displaying two buttons besides the label when i say showEdit=true showDelete=true in the data and doen't show these buttons if i dont give anything or if i give showEdit=false showDelete=false. But what ever i give or doent give that, it shows the buttons in the item renderer. and when i click on the button it returns me the correct value? can some body help me out in solving this problem and why its not working as i expect.
Re: [flexcoders] Re: Combobox ItemRenderer is now working as expected
hmm, isn't [EMAIL PROTECTED] a String, eh? Try casting it to a Boolean. DK On Nov 14, 2007 11:45 PM, srikanth_reddy_007 [EMAIL PROTECTED] wrote: Tried XML(data)[EMAIL PROTECTED] but no luck !!! --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Are you getting binding warnings? Try XML(data)[EMAIL PROTECTED] From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of srikanth_reddy_007 Sent: Wednesday, November 14, 2007 8:08 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Combobox ItemRenderer is now working as expected Can some one rectify my problem -- I have a ItemRenderer for combobox FilterListRenderer.mxml ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=20 paddingLeft=0 paddingRight=0 paddingTop=0 paddingBottom=0 initialize=init() enabled={data.enabled} mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] [Embed(source=assets/bulletCheck.png)] public var BulletCheck:Class; [Bindable] [Embed(source=assets/bulletWarning.png)] public var BulletWarning:Class; public function init():void { } ]] /mx:Script mx:Label text={data.Name} width=190 height=20 truncateToFit=true/ mx:Button width=20 height=20 right=22 bottom=0 top=0 upIcon={BulletCheck} overIcon={BulletCheck} downIcon={BulletCheck} disabledIcon={BulletCheck} visible=[EMAIL PROTECTED] click=Alert.show([EMAIL PROTECTED])/ mx:Button width=20 height=20 right=0 bottom=0 top=0 upIcon={BulletWarning} overIcon={BulletWarning} downIcon={BulletWarning} disabledIcon={BulletWarning} visible=[EMAIL PROTECTED] click=Alert.show([EMAIL PROTECTED])/ /mx:Canvas with the above code and i call this in my main application as ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute mx:XML format=e4x id=filterData Filters Filter id=1001 NameDefault/Name Category0/Category /Filter Filter id=1002 NameNetwork Filter/Name Category0/Category /Filter Filter id=1003 NameHardware Filter/Name Category0/Category /Filter Filter id=1004 NameSoftware Filter/Name Category1/Category /Filter Filter id=1005 showEdit=false showDelete=false NameAdvanced Filter/Name Category2/Category /Filter Filter id=1006 showEdit=true showDelete=true NameMy Saved Filter/Name Category3/Category /Filter Filter id=1007 showEdit=true showDelete=true NameMy Saved Filter 1/Name Category4/Category /Filter /Filters /mx:XML mx:ComboBox id=cmbFilter itemRenderer=FilterListRenderer width=250 cornerRadius=0 rowCount=10 dataProvider={filterData.Filter} labelField=Name x=38 y=47 /mx:ComboBox /mx:Application what i expect is a combo box with the Item renderer displaying two buttons besides the label when i say showEdit=true showDelete=true in the data and doen't show these buttons if i dont give anything or if i give showEdit=false showDelete=false. But what ever i give or doent give that, it shows the buttons in the item renderer. and when i click on the button it returns me the correct value? can some body help me out in solving this problem and why its not working as i expect. -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?