[flexcoders] Re: Compile Modules in AIR Project
Thanks for the reply, I have created a topic there. I tried creating a standard FB project, and linked the src folder to my AIR project. Now the SWF files are generated, but I can't get them to load into the AIR application. http://forums.adobe.com/thread/669101?tstart=0 JF --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Ask on the Flash Builder forum. On 6/26/10 8:40 PM, jmfillman jmfill...@... wrote: I have a windowedApplication (FB4; AIR 2). I create modules, they are listed as modules in the Project Properties. However, they don't compile to SWF files when I compile the application. The modules aren't compiled when I export it to an AIR installer file either. What am I missing? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Compile Modules in AIR Project
I have a windowedApplication (FB4; AIR 2). I create modules, they are listed as modules in the Project Properties. However, they don't compile to SWF files when I compile the application. The modules aren't compiled when I export it to an AIR installer file either. What am I missing?
[flexcoders] Re: DataGrid ItemRenderer Problem
Perfect thanks! Forgot all about outerDocument :-) --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Try outerDocument On 5/25/10 10:16 PM, jmfillman jmfill...@... wrote: I have an itemRenderer: mx:DataGridColumn headerText= dataField=remove width=20 mx:itemRenderer fx:Component mx:Image source=assets/Remove-32.png height=20 width=20 useHandCursor=true buttonMode=true click=trace (parentDocument); parentDocument.removeItem()/ /fx:Component /mx:itemRenderer When I first load the state where the DataGrid is, add items to the grid, remove items from the grid, etc., the trace returns the root application (My_Site). When I subsequently change states and then back to the state where the DataGrid is located, the trace returns the container: My_Site.ApplicationSkin2._ApplicationSkin_Group1.contentGroup._My_Site_SkinnableContainer1.mainContainer6 This causes an error, so the question is, how do I call the function regardless. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] DataGrid ItemRenderer Problem
I have an itemRenderer: mx:DataGridColumn headerText= dataField=remove width=20 mx:itemRenderer fx:Component mx:Image source=assets/Remove-32.png height=20 width=20 useHandCursor=true buttonMode=true click=trace (parentDocument); parentDocument.removeItem()/ /fx:Component /mx:itemRenderer When I first load the state where the DataGrid is, add items to the grid, remove items from the grid, etc., the trace returns the root application (My_Site). When I subsequently change states and then back to the state where the DataGrid is located, the trace returns the container: My_Site.ApplicationSkin2._ApplicationSkin_Group1.contentGroup._My_Site_SkinnableContainer1.mainContainer6 This causes an error, so the question is, how do I call the function regardless.
[flexcoders] dataGrid ItemRenderer Error
I'm getting the following error: Access of underfined property data Code (in a skin): mx:DataGrid left=10 top=75 right=10 bottom=10 id=searchGrid dataProvider={hostComponent.search} doubleClickEnabled=true doubleClick={hostComponent.modify()} mx:columns mx:DataGridColumn headerText=Label dataField=Label/ mx:DataGridColumn headerText=Date dataField=Date/ mx:DataGridColumn headerText=Start dataField=col3/ mx:DataGridColumn headerText=Duration dataField=Duration mx:itemRenderer fx:Component s:HGroup left=0 right=0 verticalCenter=0 s:Label text={data.Duration} / /s:HGroup /fx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid
[flexcoders] Re: Spark DropDownList Custom ItemRenderer Issue
I was wondering if you could post an example of what is meant by derive the visuals. I can see the same thing happening in my renderer, but I'm not sure what to do to correct it. --- In flexcoders@yahoogroups.com, azona26 azsl1326-em...@... wrote: Got it! Thanks for the additional insight as that is exactly what I needed to do. --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: You must derive all visuals, and that means resetting the color if it doesn't meet the criteria. On 3/29/10 10:44 AM, azona26 azsl1326-email@ wrote: Thanks. However switching to dataChange event causes all items in the DropDownList to change their text color. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: The rules for itemrenderers haven't changed that much. You must still derive all of your visuals from the data property. Use dataChange instead of creationComplete. On 3/29/10 9:32 AM, azona26 azsl1326-email@ wrote: Here's the code: s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true height=20 creationComplete=itemrenderer_creationCom! pleteHandler(event) fx:Script ![CDATA[ import com.usa.model.ThumbnailModel; import com.usa.model.presentation.LightBoxPresenationModel; import mx.events.FlexEvent; import mx.utils.StringUtil; [Inject][Bindable] public var lightBoxPM:LightBoxPresenationModel; [Inject][Bindable] ! public var tnModel:ThumbnailModel; protected var lightBoxNames_arr:Array protected function itemrenderer_creationCompleteHandler(event:FlexEvent):void { var lbl:String = StringUtil.trimArrayElements(tnModel.d! ata.asset_lightboxes,,) lightBoxNames_arr = lbl.split(,); lightBoxNames_arr.reverse(); var len:int = lightBoxNames_arr.length for (var i:int = 0; i len; i++) { // i.e. 'Lightbox #1' == 'Lightbox #1' if( lblDisplay.text == lightBoxNames_arr[i]){ lblDisplay.setStyle('color','#BB'); this.autoDrawBackground = false; } } } ]] /fx:Script s:Label toolTip={data.name} id=lblDisplay top=6 left=2 right=2 bottom=2 text={data.name} / /s:ItemRenderer Thanks for the assistance! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: What does your renderer code look like? On 3/29/10 8:08 AM, azona26 azsl1326-email@ wrote: I have a Spark DropDownList that has a custom ItemRenderer. The ItemRenderer, upon creation, checks th! e label text and if it matches certain criteria, then the labe! l text c olor changes. The label text color is changing, however it is for the wrong label. What appears to be happening is that the label color that is actually being changed is in reverse order of how the labels are displayed in the drop down list. For example, the list contains the text labels: One, Two, Three, Four, and is being displayed in that exact order. I am checking for the label One and then changing it's text color. What actually ends up ! happening is that the text color for Four (first item from bottom) is actually being changed. If I check for the text label, Three, then the text color for Two (third item from bottom) gets changed. If I check for the label text Four, the text color for One (fourth item from bottom) gets changes. This functionality seems to hold true for each item in the DropDownList. Any suggestions on how to resolve this issue so that the correct text color is being changed? Thanks for th! e assistance. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] List ItemRenderer Issue FB4
I'm not sure if this is an issue with the list component itself, or, more likely, my itemRenderer for the list. I have a few lists and if I run my application in full screen, everything appears to be okay. However, if I reduce the browser size, I cannot scroll the list to the bottom. Sometime when I re-size the browser, the items in the list revert their sort order. What makes me think it may be related to the itemRenderer is that a couple times I've seen some duplicate items in my list that appear, after I re-size the screen. List Tag (from a Skin): s:List id=itemList left=3 right=3 bottom=3 top=21 dataProvider={hostComponent.itemAC} dragMoveEnabled=true itemRenderer=skins.itemListRenderer alternatingItemColors=[0xEBE9E9, 0xFF] / ItemRenderer code: ?xml version=1.0 encoding=utf-8? s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true creationComplete=init(); fx:Script ![CDATA[ import mx.utils.ObjectProxy; [Bindable] public var dataProxy:ObjectProxy; private function init():void { dataProxy = new ObjectProxy(data); } ]] /fx:Script s:HGroup top=2 bottom=0 left=2 right=2 height=18 s:Rect id=itemColor height=12 width=12 top=2 bottom=2 radiusX=20 left=2 s:fill !--- @private -- s:SolidColor id=itemFill color={dataProxy.Color}/ /s:fill /s:Rect s:Label text={dataProxy.Label} fontSize=15/ /s:HGroup /s:ItemRenderer
[flexcoders] Re: List ItemRenderer Issue FB4
I use this so I can use ObjectProxy and avoid this: warning: unable to bind to property 'value' on class 'Object' (class is not an IEventDispatcher) Is there a better way around this warning? --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Use of creationComplete is discouraged if renderers are being recycled. On 4/8/10 4:29 PM, jmfillman jmfill...@... wrote: I'm not sure if this is an issue with the list component itself, or, more likely, my itemRenderer for the list. I have a few lists and if I run my application in full screen, everything appears to be okay. However, if I reduce the browser size, I cannot scroll the list to the bottom. Sometime when I re-size the browser, the items in the list revert their sort order. What makes me think it may be related to the itemRenderer is that a couple times I've seen some duplicate items in my list that appear, after I re-size the screen. List Tag (from a Skin): s:List id=itemList left=3 right=3 bottom=3 top=21 dataProvider={hostComponent.itemAC} dragMoveEnabled=true itemRenderer=skins.itemListRenderer alternatingItemColors=[0xEBE9E9, 0xFF] / ItemRenderer code: ?xml version=1.0 encoding=utf-8? s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true creationComplete=init(); fx:Script ![CDATA[ import mx.utils.ObjectProxy; [Bindable] public var dataProxy:ObjectProxy; private function init():void { dataProxy = new ObjectProxy(data); } ]] /fx:Script s:HGroup top=2 bottom=0 left=2 right=2 height=18 s:Rect id=itemColor height=12 width=12 top=2 bottom=2 radiusX=20 left=2 s:fill !--- @private -- s:SolidColor id=itemFill color={dataProxy.Color}/ /s:fill /s:Rect s:Label text={dataProxy.Label} fontSize=15/ /s:HGroup /s:ItemRenderer -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Spark DropDownList Custom ItemRenderer Issue
I understand that itemRenderers are reused, however, my renderer always set's the label and the color, so it would seem to me that this would always overwrite what was set previously. What's causing me issue is that the items in the DropDownList display in the reverse order of the dataProvider, but when I select an item in the DropDownList, the selectedIndex and selectedItem are referencing the order from the dataProvider, and not what is displayed in the DropDownList. DropDownList: s:DropDownList id=itemType dataProvider={categories} itemRenderer=skins.itemTypeRenderer labelField=name includeIn=edit, new top=95 height=30 left=86 selectedIndex.new=0 sellectedIndex.edit={hostComponent.colorIndex} change={hostComponent.colorIndex=itemType.selectedIndex}; {hostComponent.color=itemType.selectedItem.value} / ItemRenderer: ?xml version=1.0 encoding=utf-8? s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true creationComplete=init(); fx:Script ![CDATA[ import mx.utils.ObjectProxy; [Bindable] public var dataProxy:ObjectProxy; private function init():void { dataProxy = new ObjectProxy(data); } ]] /fx:Script s:HGroup top=0 bottom=0 left=0 right=0 s:Rect id=catColor height=10 width=10 radiusX=20 s:fill !--- @private -- s:SolidColor id=catFill color={dataProxy.value}/ /s:fill /s:Rect s:Label id=labelDisplay text={dataProxy.name}/ /s:HGroup /s:ItemRenderer --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: That is discussed here (under recycling): http://blogs.adobe.com/aharui/2007/03/ On 4/8/10 4:22 PM, jmfillman jmfill...@... wrote: I was wondering if you could post an example of what is meant by derive the visuals. I can see the same thing happening in my renderer, but I'm not sure what to do to correct it. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , azona26 azsl1326-email@ wrote: Got it! Thanks for the additional insight as that is exactly what I needed to do. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: You must derive all visuals, and that means resetting the color if it doesn't meet the criteria. On 3/29/10 10:44 AM, azona26 azsl1326-email@ wrote: Thanks. However switching to dataChange event causes all items in the DropDownList to change their text color. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: The rules for itemrenderers haven't changed that much. You must still derive all of your visuals from the data property. Use dataChange instead of creationComplete. On 3/29/10 9:32 AM, azona26 azsl1326-email@ wrote: Here's the code: s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true height=20 creationComplete=itemrenderer_creationCom! pleteHandler(event) fx:Script ![CDATA[ import com.usa.model.ThumbnailModel; import com.usa.model.presentation.LightBoxPresenationModel; import mx.events.FlexEvent; import mx.utils.StringUtil; [Inject][Bindable] public var lightBoxPM:LightBoxPresenationModel; [Inject][Bindable] ! public var tnModel:ThumbnailModel; protected var lightBoxNames_arr:Array protected function itemrenderer_creationCompleteHandler(event:FlexEvent):void { var lbl:String = StringUtil.trimArrayElements(tnModel.d! ata.asset_lightboxes,,) lightBoxNames_arr = lbl.split(,); lightBoxNames_arr.reverse(); var len:int = lightBoxNames_arr.length for (var i:int = 0; i len; i++) { // i.e. 'Lightbox #1' == 'Lightbox #1' if( lblDisplay.text == lightBoxNames_arr[i]){ lblDisplay.setStyle('color','#BB'); this.autoDrawBackground = false; } } } ]] /fx:Script s:Label toolTip={data.name} id=lblDisplay top=6 left=2 right=2 bottom=2 text={data.name} / /s:ItemRenderer Thanks for the assistance! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: What does your renderer code look like
[flexcoders] Re: List ItemRenderer Issue FB4
dataChange ultimately fixed both issues, thank you!! It did point out one variable that I needed to reset too. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Try dataChange instead of creationComplete On 4/8/10 5:03 PM, jmfillman jmfill...@... wrote: I use this so I can use ObjectProxy and avoid this: warning: unable to bind to property 'value' on class 'Object' (class is not an IEventDispatcher) Is there a better way around this warning? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Use of creationComplete is discouraged if renderers are being recycled. On 4/8/10 4:29 PM, jmfillman jmfillman@ wrote: I'm not sure if this is an issue with the list component itself, or, more likely, my itemRenderer for the list. I have a few lists and if I run my application in full screen, everything appears to be okay. However, if I reduce the browser size, I cannot scroll the list to the bottom. Sometime when I re-size the browser, the items in the list revert their sort order. What makes me think it may be related to the itemRenderer is that a couple times I've seen some duplicate items in my list that appear, after I re-size the screen. List Tag (from a Skin): s:List id=itemList left=3 right=3 bottom=3 top=21 dataProvider={hostComponent.itemAC} dragMoveEnabled=true itemRenderer=skins.itemListRenderer alternatingItemColors=[0xEBE9E9, 0xFF] / ItemRenderer code: ?xml version=1.0 encoding=utf-8? s:ItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx autoDrawBackground=true creationComplete=init(); fx:Script ![CDATA[ import mx.utils.ObjectProxy; [Bindable] public var dataProxy:ObjectProxy; private function init():void { dataProxy = new ObjectProxy(data); } ]] /fx:Script s:HGroup top=2 bottom=0 left=2 right=2 height=18 s:Rect id=itemColor height=12 width=12 top=2 bottom=2 radiusX=20 left=2 s:fill !--- @private -- s:SolidColor id=itemFill color={dataProxy.Color}/ /s:fill /s:Rect s:Label text={dataProxy.Label} fontSize=15/ /s:HGroup /s:ItemRenderer -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: The supplied DisplayObject must be a child of the caller
this.numChildren returns 7 Will work on a sample app to demonstrate. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Maybe publish a full test case in 20 lines or so. What is this.numChildren? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Tuesday, September 08, 2009 10:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] The supplied DisplayObject must be a child of the caller So I'm trying to remove a child from a canvas container. trace (this.getChildAt(6)); this.removeChild(this.getChildAt(6)); this.removeChildAt(6); The trace statement returns the path to the correct child, but when I try removeChild() or removeChildAt(), I get: The supplied DisplayObject must be a child of the caller at flash.display::DisplayObjectContainer/getChildIndex() Why???
[flexcoders] Re: The supplied DisplayObject must be a child of the caller
Even though this.numChildren returns 7, this.removeChildAt(5) removes the correct child. It works, but I'm a bit confused. --- In flexcoders@yahoogroups.com, jmfillman jmfill...@... wrote: this.numChildren returns 7 Will work on a sample app to demonstrate. --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Maybe publish a full test case in 20 lines or so. What is this.numChildren? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Tuesday, September 08, 2009 10:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] The supplied DisplayObject must be a child of the caller So I'm trying to remove a child from a canvas container. trace (this.getChildAt(6)); this.removeChild(this.getChildAt(6)); this.removeChildAt(6); The trace statement returns the path to the correct child, but when I try removeChild() or removeChildAt(), I get: The supplied DisplayObject must be a child of the caller at flash.display::DisplayObjectContainer/getChildIndex() Why???
[flexcoders] The supplied DisplayObject must be a child of the caller
So I'm trying to remove a child from a canvas container. trace (this.getChildAt(6)); this.removeChild(this.getChildAt(6)); this.removeChildAt(6); The trace statement returns the path to the correct child, but when I try removeChild() or removeChildAt(), I get: The supplied DisplayObject must be a child of the caller at flash.display::DisplayObjectContainer/getChildIndex() Why???
[flexcoders] Coding Best Practices/Accessing Using External AS
I have a series of component canvas containers that have children added and updated based on data in an ArrayCollection. The logic for the layout of the children in the container is identical for each canvas. What I am struggling with is where to put the logic for the layout. If I put it inside the custom canvas container, I'm loading all this code each time I add the custom canvas container to the parent application, and there could be 20+ canvas containers added to the application. If I leave the layout logic in the parent container, then the layout for each canvas occurs in sequential order as I loop through all the canvas containers. I need the layout logic to run simultaneous and independantly for each canvas. So the question is, how do I externalize my layout logic so each container can use it, and not have the code internal to the component? What is the best practice? The canvas container has to pass an Array of data to the script and it will need to add and update children within the canvas container. To may way of thinking, each container shouldn't contain the same 400 lines of layout logic code. Instead, each instance of the container should be able to call the code, which is only loaded into the application 1 time. That seem's like the efficient way to go, but I'm not sure how to do this or if it's the right way to do it. I'm using Flex 3.
[flexcoders] Re: Coding Best Practices/Accessing Using External AS
This goes to my lack of understanding in this area, but your saying create my own container type, correct? My logic sets the x, y, width, and height, so I don't know that I need all the measure and other items found in the ContainerLayout scripting associated with the standard container. Any good examples, tutorials on this? I'm just not up on base class and subclasses, etc. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Sounds like you need a base class with the layout logic, then 20+ subclasses of that base class. You may not need to start with Canvas, mx.core.Container might be good enough. Then you can follow the model of how Box, VBox and HBox and their layout code is configured. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Friday, September 04, 2009 11:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Coding Best Practices/Accessing Using External AS I have a series of component canvas containers that have children added and updated based on data in an ArrayCollection. The logic for the layout of the children in the container is identical for each canvas. What I am struggling with is where to put the logic for the layout. If I put it inside the custom canvas container, I'm loading all this code each time I add the custom canvas container to the parent application, and there could be 20+ canvas containers added to the application. If I leave the layout logic in the parent container, then the layout for each canvas occurs in sequential order as I loop through all the canvas containers. I need the layout logic to run simultaneous and independantly for each canvas. So the question is, how do I externalize my layout logic so each container can use it, and not have the code internal to the component? What is the best practice? The canvas container has to pass an Array of data to the script and it will need to add and update children within the canvas container. To may way of thinking, each container shouldn't contain the same 400 lines of layout logic code. Instead, each instance of the container should be able to call the code, which is only loaded into the application 1 time. That seem's like the efficient way to go, but I'm not sure how to do this or if it's the right way to do it. I'm using Flex 3.
[flexcoders] Re: Coding Best Practices/Accessing Using External AS
Yes, I have a custom canvas component. Currently, my layout logic is in the parent application, and has to perform the layout sequentially for the data relevant to each instance of the custom component. My concern was that FlashPlayer/AIR is loading the component X number of times and so the memory usage would quickly get out of hand. With your description, it only gets loaded once, but used multiple times, and that would work just fine. Thank you for the explanation! --- In flexcoders@yahoogroups.com, ag_rcuren robert.vancuren...@... wrote: So if I am understanding you correctly you have built a custom component already and you are just making many instances of it during the runtime of your app? If this is the case it is fine to put the logic in the custom canvas. Once you compile the code each time you add a new instance of the component it will not be adding the 400 lines of code to your app over and over. All of the components reference the same compiled code. Even if you are loading modules once you load a module once the application is smart enough to know that that code is already loaded into the app and does not reload all of that code. Now if you are talking about 20 separate classes that all have the same code copied and pasted (yikes) you would want to use a base class and extend from that. --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: I have a series of component canvas containers that have children added and updated based on data in an ArrayCollection. The logic for the layout of the children in the container is identical for each canvas. What I am struggling with is where to put the logic for the layout. If I put it inside the custom canvas container, I'm loading all this code each time I add the custom canvas container to the parent application, and there could be 20+ canvas containers added to the application. If I leave the layout logic in the parent container, then the layout for each canvas occurs in sequential order as I loop through all the canvas containers. I need the layout logic to run simultaneous and independantly for each canvas. So the question is, how do I externalize my layout logic so each container can use it, and not have the code internal to the component? What is the best practice? The canvas container has to pass an Array of data to the script and it will need to add and update children within the canvas container. To may way of thinking, each container shouldn't contain the same 400 lines of layout logic code. Instead, each instance of the container should be able to call the code, which is only loaded into the application 1 time. That seem's like the efficient way to go, but I'm not sure how to do this or if it's the right way to do it. I'm using Flex 3.
[flexcoders] Re: Coding Best Practices/Accessing Using External AS
The parent will be pulling the data from the DB and passing the data to each instance of the component to display. The array of data in each component would routinely carry 30-40 items, but could have 50+ items on occasion. --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: The definition gets loaded once, 20 instances are created and 20 copies of any of those instance's sub objects, etc. Usually that's small, but if you have a lot of sub objects or a lot of properties or really big properties like large arrays and bitmaps, then 20 instances can eat a lot of memory. Usually, for good modular design, the parent app or some outside' thing provides data (from the server, or a set of children) to a container and logic in the container does the layout. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Friday, September 04, 2009 12:28 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Coding Best Practices/Accessing Using External AS Yes, I have a custom canvas component. Currently, my layout logic is in the parent application, and has to perform the layout sequentially for the data relevant to each instance of the custom component. My concern was that FlashPlayer/AIR is loading the component X number of times and so the memory usage would quickly get out of hand. With your description, it only gets loaded once, but used multiple times, and that would work just fine. Thank you for the explanation! --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, ag_rcuren robert.vancuren.jr@ wrote: So if I am understanding you correctly you have built a custom component already and you are just making many instances of it during the runtime of your app? If this is the case it is fine to put the logic in the custom canvas. Once you compile the code each time you add a new instance of the component it will not be adding the 400 lines of code to your app over and over. All of the components reference the same compiled code. Even if you are loading modules once you load a module once the application is smart enough to know that that code is already loaded into the app and does not reload all of that code. Now if you are talking about 20 separate classes that all have the same code copied and pasted (yikes) you would want to use a base class and extend from that. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, jmfillman jmfillman@ wrote: I have a series of component canvas containers that have children added and updated based on data in an ArrayCollection. The logic for the layout of the children in the container is identical for each canvas. What I am struggling with is where to put the logic for the layout. If I put it inside the custom canvas container, I'm loading all this code each time I add the custom canvas container to the parent application, and there could be 20+ canvas containers added to the application. If I leave the layout logic in the parent container, then the layout for each canvas occurs in sequential order as I loop through all the canvas containers. I need the layout logic to run simultaneous and independantly for each canvas. So the question is, how do I externalize my layout logic so each container can use it, and not have the code internal to the component? What is the best practice? The canvas container has to pass an Array of data to the script and it will need to add and update children within the canvas container. To may way of thinking, each container shouldn't contain the same 400 lines of layout logic code. Instead, each instance of the container should be able to call the code, which is only loaded into the application 1 time. That seem's like the efficient way to go, but I'm not sure how to do this or if it's the right way to do it. I'm using Flex 3.
[flexcoders] Re: Context Menu mouseTarget Issue
This worked: myCanvas.removeChildAt(myCanvas.getChildIndex(event.mouseTarget)); and myCanvas.removeChildAt(myCanvas.getChildIndex(event.mouseTarget.parent)); depending on whether the mouse is over the root Panel component or the child containers added to the panel. The harder part is identifying which item in my ArrayCollection corresponds to the mouseTarget. What I've ended up doing is capturing the parent/child path (E.g. TestApp0.canvasShell.myCanvas.myContainer592) in my ArrayCollection, then looping until I find a match and removing that item. Is there a more efficient way? --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: What is event.mouseTarget? and what is its parent? You might be off a level or two. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Tuesday, September 01, 2009 2:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Context Menu mouseTarget Issue I have a canvas container with several custom containers added to it. I have a context menu so that when you right click on the containers, you can remove it from the canvas container. When I go to remove a child, I get an error, below. Code: private function menuSelectHandler(event:ContextMenuEvent):void { var remChild:Number; var target:String = event.mouseTarget.toString(); trace (target); if (target.match(UIComponent) == null target.match(resizeBar) == null) { trace ( True 1); trace ( +event.mouseTarget); remChild = cal0Day.getChildIndex(event.mouseTarget); } else { trace ( True 2); trace ( +event.mouseTarget.parent); remChild = myCanvas.getChildIndex(event.mouseTarget.parent); } trace (remChild); trace (myCanvas.getChildAt(remChild)); myCanvas.removeChildAt(remChild); myAC.removeChildAt(remChild); updateLayout(); } TestApp0.canvasShell.myCanvas.myContainer592 True 1 TestApp0.canvasShell.myCanvas.myContainer592 12 TestApp0.canvasShell.myCanvas.myContainer592 Then I get the following error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/getChildIndex() How do I do this?
[flexcoders] Set child properties from event.target
I have a rollOver = myFunction(event) that fires when the mouse rolls over the panel. From the event.target that is passed to myFunction, I need the syntax to for the child in the Panel, and set the properties of the child. For example, I have a button in the panel named myButton and I want to set it to visible when the rollOver event fires.
[flexcoders] Context Menu mouseTarget Issue
I have a canvas container with several custom containers added to it. I have a context menu so that when you right click on the containers, you can remove it from the canvas container. When I go to remove a child, I get an error, below. Code: private function menuSelectHandler(event:ContextMenuEvent):void { var remChild:Number; var target:String = event.mouseTarget.toString(); trace (target); if (target.match(UIComponent) == null target.match(resizeBar) == null) { trace ( True 1); trace (+event.mouseTarget); remChild = cal0Day.getChildIndex(event.mouseTarget); } else { trace ( True 2); trace (+event.mouseTarget.parent); remChild = myCanvas.getChildIndex(event.mouseTarget.parent); } trace (remChild); trace (myCanvas.getChildAt(remChild)); myCanvas.removeChildAt(remChild); myAC.removeChildAt(remChild); updateLayout(); } TestApp0.canvasShell.myCanvas.myContainer592 True 1 TestApp0.canvasShell.myCanvas.myContainer592 12 TestApp0.canvasShell.myCanvas.myContainer592 Then I get the following error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/getChildIndex() How do I do this?
[flexcoders] Detecting ResizeEvent Complete
How do I determine when a ResizeEvent has completed? I'm doing some measuring of a container when the application is resized, however, if I measure the container when the ResizeEvent is triggered, I don't get the final container width.
[flexcoders] Find Actual Width After Setting Percent Width
I have a canvas container with=100%. When the user clicks a button, the container is set to percentWidth=20, and I need to immediately know the new width so that I can properly re-size elements in the container to match the new width. From what I can tell, the LayoutManager doesn't get to measuring the new width of the container right away. If the user clicks the button again, the LayoutManager has done it's thing and has set the width value of the canvas. So the question is, how do I get the new width of the canvas as soon as I set percentWidth=20?
[flexcoders] Re: Find Actual Width After Setting Percent Width
If you trace the width and measuredWidth immediately after setting the percentWidth, both width and measuredWidth show the original width instead of the updated width. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: What does canvas.measuredWidth give when the user clicks the button? --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: I have a canvas container with=100%. When the user clicks a button, the container is set to percentWidth=20, and I need to immediately know the new width so that I can properly re-size elements in the container to match the new width. From what I can tell, the LayoutManager doesn't get to measuring the new width of the container right away. If the user clicks the button again, the LayoutManager has done it's thing and has set the width value of the canvas. So the question is, how do I get the new width of the canvas as soon as I set percentWidth=20?
[flexcoders] Re: Find Actual Width After Setting Percent Width
The code below should demonstrate the issue more specifically. What you get when the clicked() function is called, shows that there is a slight delay in getting the width of the container. You'll note that the trace statement returns the original width as does the txtWidth field. You will note, however, that if you bind to the width of the container, you do get the correct width of the canvas. What I infer from this is that there is a delay in FlashPlayer/Air in having the width value set. If, however, you use the previous example, posted Beau, this works, presumably because the item you are re-sizing is within a container and the LayoutManager deals with nested items first, as I recall. Why the validateNow() function doesn't complete before moving on to the other two elements in the clicked() function, wasn't what I expected. This is probably a speed thing in the function so as to not hold up other items while the item is being validated??? ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init(); initialize=maximize(); verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ private function clicked():void { foo.percentWidth = 50; foo.invalidateSize(); foo.validateNow(); txtWidth.text = foo.width.toString(); trace (foo.width); } ]] /mx:Script mx:HBox height=24 top=0 left=0 right=0 mx:Button click=clicked() label=click me/ /mx:HBox mx:Canvas id=foo width=100% left=182 top=63 bottom=0 borderColor=red borderThickness=1 borderStyle=solid /mx:Canvas mx:Text x=0 y=32 width=76 id=txtWidth/ mx:Text x=0 y=60 text={foo.width} width=76/ /mx:WindowedApplication --- In flexcoders@yahoogroups.com, Beau Scott beau.sc...@... wrote: You'll need to invalidate the component's parent's size and revalidate it before your target's size is computed: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.core.UIComponent; private function clicked():void { trace(bar.width); bar.percentWidth = bar.percentWidth == 100 ? 50 : 100; UIComponent(bar.parent).invalidateSize(); UIComponent(bar.parent).validateNow(); trace(bar.width); } ]] /mx:Script mx:Box id=foo width=100% height=50 borderColor=red borderThickness=1 borderStyle=solid mx:Box id=bar width=100% height=100% borderColor=blue borderThickness=1 borderStyle=solid / /mx:Box mx:Button click=clicked() label=click me / /mx:WindowedApplication Run that and click the button to see the trace output. HTH, Beau On Wed, Aug 26, 2009 at 10:04 AM, jmfillman jmfill...@... wrote: If you trace the width and measuredWidth immediately after setting the percentWidth, both width and measuredWidth show the original width instead of the updated width. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, valdhor valdhorlists@ wrote: What does canvas.measuredWidth give when the user clicks the button? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, jmfillman jmfillman@ wrote: I have a canvas container with=100%. When the user clicks a button, the container is set to percentWidth=20, and I need to immediately know the new width so that I can properly re-size elements in the container to match the new width. From what I can tell, the LayoutManager doesn't get to measuring the new width of the container right away. If the user clicks the button again, the LayoutManager has done it's thing and has set the width value of the canvas. So the question is, how do I get the new width of the canvas as soon as I set percentWidth=20? -- Beau D. Scott Software Engineer
[flexcoders] TitleWindow closeButton Color
Is there a style for the color of the closeButton in a TitleWindow? I can't seem to find it, but it seems odd to have black be the only option. Can't seem to embed an image for the closeButtonSkin either. Setting a style in CSS doesn't work, or...?? TitleWindow { closeButtonSkin: Embed(assets/close.png); }
[flexcoders] Re: Context Menu Bug in FlashPlayer ?
I did file a bug with Adobe. Hopefully it'll be addressed soon. Interesting that it was encountered in FlashPlayer 9. I don't recall which version of 9 I had, but I did not encounter this error until I went to FlashPlayer 10. For my application, it is critical that particular conectMenu items only appear when right-clicking on certain display items. Once the mouse moves off of the item, that custom item should no longer be available. If there is a better way to accomplish this, I would be very interested in exploring it. -JF --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: I think I know why it crashes (Although it should not crash the browser - it should fail with a Flash null object error. You should file a bug). When a right click event happens, a mouse out event happens first (Why? I don't know. Maybe this is a bug too) so your mouseOt function gets called which removes the context menu item. I assume, at this point, that the eventlistener is no longer valid but the event has already fired and is trying to find somewhere to go. This is what causes the crash. The moral of this is that you should not remove something willy nilly like this. First make sure you do not need it any more and then remove it. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Not here. I am still using Flash Player 9.0.124. --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: Thank you for the follow-up. The blankMenu is actually a left over from my actual application and wasn't needed for this sample code. This worked fine in FlashPlayer 9, so must be a bug with 10. JF --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I tried your code and it crashes my browser here. I could not find a way to stop that behavior in my (Admittedly short) testing. The only thing that jumped out at me was that your blankMenu is a null object as it is never instantiated. Unfortunately, even if it is instantiated, the crashing continues. The one question I have is why you are assigning a blank menu on mouseout? There is no reason to do this. If the mouse is no longer over the button, there is no context menu. I would just ignore a mouseout entirely. If I get some more time I will have another look. Other that that, maybe someone else has a suggestion. Steve --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: Any suggestions? Am I doing something wrong? JF --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: The code below causes both IE and Firefox to crash (haven't tried others). The problem seems to occure when removing an item from a custom context menu. It doesn't even debug, just crashes the browser. If I add this one line: menu.customItems.pop(); then the browser crashes. If I remove it, if functions as expected. Please help. Sample code below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] public var menu:ContextMenu; [Bindable] public var blankMenu:ContextMenu; public function mouseOvr(event:MouseEvent):void { menu = new ContextMenu; var addPop:ContextMenuItem = new ContextMenuItem(Do Something); addPop.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, newPop); menu.customItems.push(addPop); myButton.contextMenu = menu; } public function newPop (event:ContextMenuEvent):void { Alert.show(Hi); } public function mouseOt(event:MouseEvent):void { myButton.contextMenu = blankMenu; menu.customItems.pop(); } ]] /mx:Script mx:Button x=349 y=189 label=Button width=101 height=41 id=myButton mouseOver=mouseOvr(event) mouseOut=mouseOt(event)/ /mx:Application
[flexcoders] Re: Context Menu Bug in FlashPlayer ?
Thank you for the follow-up. The blankMenu is actually a left over from my actual application and wasn't needed for this sample code. This worked fine in FlashPlayer 9, so must be a bug with 10. JF --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: I tried your code and it crashes my browser here. I could not find a way to stop that behavior in my (Admittedly short) testing. The only thing that jumped out at me was that your blankMenu is a null object as it is never instantiated. Unfortunately, even if it is instantiated, the crashing continues. The one question I have is why you are assigning a blank menu on mouseout? There is no reason to do this. If the mouse is no longer over the button, there is no context menu. I would just ignore a mouseout entirely. If I get some more time I will have another look. Other that that, maybe someone else has a suggestion. Steve --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: Any suggestions? Am I doing something wrong? JF --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: The code below causes both IE and Firefox to crash (haven't tried others). The problem seems to occure when removing an item from a custom context menu. It doesn't even debug, just crashes the browser. If I add this one line: menu.customItems.pop(); then the browser crashes. If I remove it, if functions as expected. Please help. Sample code below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] public var menu:ContextMenu; [Bindable] public var blankMenu:ContextMenu; public function mouseOvr(event:MouseEvent):void { menu = new ContextMenu; var addPop:ContextMenuItem = new ContextMenuItem(Do Something); addPop.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, newPop); menu.customItems.push(addPop); myButton.contextMenu = menu; } public function newPop (event:ContextMenuEvent):void { Alert.show(Hi); } public function mouseOt(event:MouseEvent):void { myButton.contextMenu = blankMenu; menu.customItems.pop(); } ]] /mx:Script mx:Button x=349 y=189 label=Button width=101 height=41 id=myButton mouseOver=mouseOvr(event) mouseOut=mouseOt(event)/ /mx:Application
[flexcoders] Re: Context Menu Bug in FlashPlayer ?
Any suggestions? Am I doing something wrong? JF --- In flexcoders@yahoogroups.com, jmfillman jmfill...@... wrote: The code below causes both IE and Firefox to crash (haven't tried others). The problem seems to occure when removing an item from a custom context menu. It doesn't even debug, just crashes the browser. If I add this one line: menu.customItems.pop(); then the browser crashes. If I remove it, if functions as expected. Please help. Sample code below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] public var menu:ContextMenu; [Bindable] public var blankMenu:ContextMenu; public function mouseOvr(event:MouseEvent):void { menu = new ContextMenu; var addPop:ContextMenuItem = new ContextMenuItem(Do Something); addPop.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, newPop); menu.customItems.push(addPop); myButton.contextMenu = menu; } public function newPop (event:ContextMenuEvent):void { Alert.show(Hi); } public function mouseOt(event:MouseEvent):void { myButton.contextMenu = blankMenu; menu.customItems.pop(); } ]] /mx:Script mx:Button x=349 y=189 label=Button width=101 height=41 id=myButton mouseOver=mouseOvr(event) mouseOut=mouseOt(event)/ /mx:Application
[flexcoders] Context Menu Bug in FlashPlayer ?
The code below causes both IE and Firefox to crash (haven't tried others). The problem seems to occure when removing an item from a custom context menu. It doesn't even debug, just crashes the browser. If I add this one line: menu.customItems.pop(); then the browser crashes. If I remove it, if functions as expected. Please help. Sample code below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] public var menu:ContextMenu; [Bindable] public var blankMenu:ContextMenu; public function mouseOvr(event:MouseEvent):void { menu = new ContextMenu; var addPop:ContextMenuItem = new ContextMenuItem(Do Something); addPop.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, newPop); menu.customItems.push(addPop); myButton.contextMenu = menu; } public function newPop (event:ContextMenuEvent):void { Alert.show(Hi); } public function mouseOt(event:MouseEvent):void { myButton.contextMenu = blankMenu; menu.customItems.pop(); } ]] /mx:Script mx:Button x=349 y=189 label=Button width=101 height=41 id=myButton mouseOver=mouseOvr(event) mouseOut=mouseOt(event)/ /mx:Application
[flexcoders] Re: Modify arrayCollection Structure
The more I've studied this, the more I think I'm asking the wrong question. I think that I really need to be merging two objects, and then adding them to the arrayCollection. I have object1 that contains: userID, firstName, lastName, phoneNumber and I have object2 that contains: eventID The trick here is that except for the userID field, the other fields will vary in number and name, because I've externalized the itemRenderer so that developers can structure their own view for their own data. I need to merge the two objects into a 3rd object. --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: I haven't looked at Alex's example(which is probably a big mistake on my part...), but here are some thoughts. You haven't said what the ArrayCollection is a collection *of*. So it is probably a collection of dynamic Objects. Normally this is not a problem, but in many cases, it is better to have a strongly typed VO(value object), as this gives the access best performance. So, since you need another property, I suggest you create a vo class. Make the whole class Bindable, unless you want to do different. Include all the fields in your normal object, plus add your special field to that class. Then, in your result handler, loop over your array of objects, and build an ArrayCollection of your Vos. One approach to this is to have a fill method that takes the basic data object and populates the class instance property values. You wind up with the field you need, plus a best-case performance situation. If you want the shortcut, just loop over the items and add the new field to the dynamic object. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Wednesday, January 07, 2009 7:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Modify arrayCollection Structure I need to add an extra field where data will be added. The field would be empty, to start, and isn't coming from another arrayCollection to merge with the original. JF --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Merged array list example on my blog From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of jmfillman Sent: Wednesday, January 07, 2009 3:54 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Modify arrayCollection Structure Is there a good way to add a column of data to an arrayCollection? For example, I have an arrayCollection with the following data columns as received from my remoteObject call: id, firstName, lastName, phoneNumber I need to add an extra column for use in my app: id, firstName, lastName, phoneNumber, date I don't need the last field saved in my database, but I haven't found a good way to add this extra column to the arrayCollection short of creating the extra field in the database and passing it back to my app with the query results. This seems unnecessary to have a dummy field in my database. I could probably loop through the results and add them to another arrayCollection with my needed structure, but from a performance standpoint in my app, that's a less desirable option than just using the dummy field. Are there other options? JF
[flexcoders] Modify arrayCollection Structure
Is there a good way to add a column of data to an arrayCollection? For example, I have an arrayCollection with the following data columns as received from my remoteObject call: id, firstName, lastName, phoneNumber I need to add an extra column for use in my app: id, firstName, lastName, phoneNumber, date I don't need the last field saved in my database, but I haven't found a good way to add this extra column to the arrayCollection short of creating the extra field in the database and passing it back to my app with the query results. This seems unnecessary to have a dummy field in my database. I could probably loop through the results and add them to another arrayCollection with my needed structure, but from a performance standpoint in my app, that's a less desirable option than just using the dummy field. Are there other options? JF
[flexcoders] Re: Modify arrayCollection Structure
I need to add an extra field where data will be added. The field would be empty, to start, and isn't coming from another arrayCollection to merge with the original. JF --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Merged array list example on my blog From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Wednesday, January 07, 2009 3:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Modify arrayCollection Structure Is there a good way to add a column of data to an arrayCollection? For example, I have an arrayCollection with the following data columns as received from my remoteObject call: id, firstName, lastName, phoneNumber I need to add an extra column for use in my app: id, firstName, lastName, phoneNumber, date I don't need the last field saved in my database, but I haven't found a good way to add this extra column to the arrayCollection short of creating the extra field in the database and passing it back to my app with the query results. This seems unnecessary to have a dummy field in my database. I could probably loop through the results and add them to another arrayCollection with my needed structure, but from a performance standpoint in my app, that's a less desirable option than just using the dummy field. Are there other options? JF
[flexcoders] Re: Display only part of a canvas??
Paul, I've been working on using an scroll bar. The only issue I have with this is that it reaches the bottom of the scroll area when the scroll bar is about half way down. See the following example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init(); mx:Script ![CDATA[ import mx.events.ScrollEvent; private function init():void { myCanvas.verticalScrollPosition = vBar.maxScrollPosition; myCanvas.verticalScrollPosition = vBar.minScrollPosition; } private function myScroll(event:ScrollEvent):void { myCanvas.verticalScrollPosition = event.currentTarget.scrollPosition; } ]] /mx:Script mx:Canvas width=100% height=100% mx:Canvas id=myCanvas left=0 top=0 right=15 bottom=0 verticalScrollPolicy=off horizontalScrollPolicy=off mx:Button label=Button 1 left=10 top=0/ mx:Button label=Button 2 left=10 top=250/ mx:Button label=Button 3 left=10 top=1250/ mx:Button y=2500 label=Button 4 left=10 includeInLayout=false/ /mx:Canvas mx:VScrollBar id=vBar minScrollPosition=250 maxScrollPosition=1250 lineScrollSize=35 pageScrollSize=50 repeatDelay=1000 repeatInterval=500 scrollPosition=250 scroll=myScroll(event); right=0 top=0 bottom=0/ /mx:Canvas /mx:Application JF --- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote: - Original Message - From: jmfillman jmfill...@... To: flexcoders@yahoogroups.com Sent: Tuesday, December 23, 2008 11:22 PM Subject: [flexcoders] Re: Display only part of a canvas?? Hi Tracy, This may work, I'd have to try it, and may be my best option. I was hoping to be able to reset the scrollBar so that it appears to the user that they are seeing everything. Why can't you just suppress the scrollbar and add one of your own? You can set it to whatever you like then. Paul JF --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: Just thinking aloud, but supposed you intercepted the scroll events and calculated whether the user was allowed to move that way and apply preventDefault if not? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Tuesday, December 23, 2008 4:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Display only part of a canvas?? I appreciate the responses, but I do not believe this will accomplish what I need. Masking is the closest so far, but the scroll bars create a problem. Simply making items hidden, does hide viewable items, but leaves the container with a lot of blank space. Essentially, I want to override the index or whatever values the scrollbar uses to determine the top and bottom of the container, and set my own values. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Manish Jethani manish.jethani@ wrote: On Tue, Dec 23, 2008 at 5:41 AM, jmfillman jmfillman@ wrote: I have a Canvas that with a height of 3000. For some users, I only want them to be able to view and scroll a portion of the height of the canvas, say 1200-2200. It can vary from user to user, and some will need to see the entire height. I'm at a loss as to whether or not this is even possible, and if so, how. Suppose you have a canvas with 5 items. Canvas Item / Item / Item / Item / Item / /Canvas You want some users to see only the first 3, is that correct? If yes, you can just set 'visible' to false and 'includeInLayout' to false on the items that you want to hide, and that should take care of it. -- manishjethani.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469- 446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Display only part of a canvas??
I appreciate the responses, but I do not believe this will accomplish what I need. Masking is the closest so far, but the scroll bars create a problem. Simply making items hidden, does hide viewable items, but leaves the container with a lot of blank space. Essentially, I want to override the index or whatever values the scrollbar uses to determine the top and bottom of the container, and set my own values. --- In flexcoders@yahoogroups.com, Manish Jethani manish.jeth...@... wrote: On Tue, Dec 23, 2008 at 5:41 AM, jmfillman jmfill...@... wrote: I have a Canvas that with a height of 3000. For some users, I only want them to be able to view and scroll a portion of the height of the canvas, say 1200-2200. It can vary from user to user, and some will need to see the entire height. I'm at a loss as to whether or not this is even possible, and if so, how. Suppose you have a canvas with 5 items. Canvas Item / Item / Item / Item / Item / /Canvas You want some users to see only the first 3, is that correct? If yes, you can just set 'visible' to false and 'includeInLayout' to false on the items that you want to hide, and that should take care of it. -- manishjethani.com
[flexcoders] Re: Display only part of a canvas??
This crops the scroll area only for items after the last included item. Take the following example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Canvas left=0 bottom=0 top=0 right=0 mx:Button x=10 y=10 label=Button 1 includeInLayout=false visible=false/ mx:Button x=10 y=1000 label=Button 2 includeInLayout=true visible=true/ mx:Button x=10 y=1500 label=Button 3 includeInLayout=true visible=true/ mx:Button x=10 y=3000 label=Button 4 includeInLayout=true visible=true/ mx:Button x=10 y=4000 label=Button 5 includeInLayout=false visible=false/ /mx:Canvas /mx:Application The scrollBar still starts at 0, but does stop just after displaying Button 3. I need the scroll to start at 1000, and not be able to scroll less than 1000 and no higher than 3000. While Button 1 is not visible, the scrollBar still accounts for the space between 0 and 1000. I'm trying to make scrollRect crop the canvas. I'm able to restrict the view, but I can't make it scroll. Take this example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=100% height=100% creationComplete=init (); mx:Script ![CDATA[ private function init():void { myCanvas.scrollRect = new Rectangle(0,0,500, 1700); } ]] /mx:Script mx:Canvas width=100% height=100% verticalScrollPolicy=off horizontalScrollPolicy=off mx:Canvas left=0 right=10 id=myCanvas top=0 verticalScrollPolicy=on horizontalScrollPolicy=off bottom=10 mx:Button left=10 y=10 label=Button 1/ mx:Button y=1500 label=Button 2 left=10/ mx:Button label=Button 3 left=10 y=2550/ /mx:Canvas /mx:Canvas /mx:Application Where is the vertical scroll bar? --- In flexcoders@yahoogroups.com, Manish Jethani manish.jeth...@... wrote: On Wed, Dec 24, 2008 at 2:36 AM, jmfillman jmfill...@... wrote: I appreciate the responses, but I do not believe this will accomplish what I need. Masking is the closest so far, but the scroll bars create a problem. Simply making items hidden, does hide viewable items, but leaves the container with a lot of blank space. That's exactly why I suggested that, in addition to setting visible to false, you also set includeInLayout to false. That will remove the items from the canvas and it'll be as if they didn't exist (until you showed them again). What I'm suggesting is the equivalent of CSS's display: none, if you're familiar with that. -- manishjethani.com
[flexcoders] Re: Display only part of a canvas??
Yeah, I need a Canvas. I have to positions items horizontally and vertically within the Canvas. --- In flexcoders@yahoogroups.com, Manish Jethani manish.jeth...@... wrote: On Wed, Dec 24, 2008 at 4:07 AM, jmfillman jmfill...@... wrote: This crops the scroll area only for items after the last included item. Take the following example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Canvas left=0 bottom=0 top=0 right=0 mx:Button x=10 y=10 label=Button 1 includeInLayout=false visible=false/ mx:Button x=10 y=1000 label=Button 2 includeInLayout=true visible=true/ mx:Button x=10 y=1500 label=Button 3 includeInLayout=true visible=true/ mx:Button x=10 y=3000 label=Button 4 includeInLayout=true visible=true/ mx:Button x=10 y=4000 label=Button 5 includeInLayout=false visible=false/ /mx:Canvas /mx:Application The scrollBar still starts at 0, but does stop just after displaying Button 3. I need the scroll to start at 1000, and not be able to scroll less than 1000 and no higher than 3000. While Button 1 is not visible, the scrollBar still accounts for the space between 0 and 1000. I see. Any particular reason for using Canvas? If you're laying them out vertically as in this example, then I think you could use VBox and your problem would be solved (along with visible/includeInLayout). The problem here is that Canvas will start counting from the absolute position of the top-most visible item (y=1000), so it'll still leave 1000 px. blank space. You don't have that with VBox. I'm trying to make scrollRect crop the canvas. I'm able to restrict the view, but I can't make it scroll. Take this example: scrollRect or mask is just not going to work nicely with a Flex container. I wouldn't go there at all. -- manishjethani.com
[flexcoders] Re: Display only part of a canvas??
Hi Tracy, This may work, I'd have to try it, and may be my best option. I was hoping to be able to reset the scrollBar so that it appears to the user that they are seeing everything. JF --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Just thinking aloud, but supposed you intercepted the scroll events and calculated whether the user was allowed to move that way and apply preventDefault if not? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jmfillman Sent: Tuesday, December 23, 2008 4:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Display only part of a canvas?? I appreciate the responses, but I do not believe this will accomplish what I need. Masking is the closest so far, but the scroll bars create a problem. Simply making items hidden, does hide viewable items, but leaves the container with a lot of blank space. Essentially, I want to override the index or whatever values the scrollbar uses to determine the top and bottom of the container, and set my own values. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Manish Jethani manish.jethani@ wrote: On Tue, Dec 23, 2008 at 5:41 AM, jmfillman jmfillman@ wrote: I have a Canvas that with a height of 3000. For some users, I only want them to be able to view and scroll a portion of the height of the canvas, say 1200-2200. It can vary from user to user, and some will need to see the entire height. I'm at a loss as to whether or not this is even possible, and if so, how. Suppose you have a canvas with 5 items. Canvas Item / Item / Item / Item / Item / /Canvas You want some users to see only the first 3, is that correct? If yes, you can just set 'visible' to false and 'includeInLayout' to false on the items that you want to hide, and that should take care of it. -- manishjethani.com
[flexcoders] Re: Display only part of a canvas??
I'm very close. I still need help with the scrollBar so that the scrollBar reaches the bottom when you reach the bottom of the scroll area of the Canvas. Any suggestions? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init(); mx:Script ![CDATA[ import mx.events.ScrollEvent; private function init():void { myCanvas.verticalScrollPosition = vBar.maxScrollPosition; myCanvas.verticalScrollPosition = vBar.minScrollPosition; } private function myScroll(event:ScrollEvent):void { myCanvas.verticalScrollPosition = event.currentTarget.scrollPosition; } ]] /mx:Script mx:Canvas width=100% height=100% mx:Canvas id=myCanvas left=0 top=0 right=15 bottom=0 verticalScrollPolicy=off horizontalScrollPolicy=off mx:Button label=Button 1 left=10 top=0/ mx:Button label=Button 2 left=10 top=250/ mx:Button label=Button 3 left=10 top=1250/ mx:Button y=2500 label=Button 4 left=10 includeInLayout=false/ /mx:Canvas mx:VScrollBar id=vBar minScrollPosition=250 maxScrollPosition=1250 lineScrollSize=35 pageScrollSize=50 repeatDelay=1000 repeatInterval=500 scrollPosition=250 scroll=myScroll(event); right=0 top=0 bottom=0/ /mx:Canvas /mx:Application --- In flexcoders@yahoogroups.com, jmfillman jmfill...@... wrote: I have a Canvas that with a height of 3000. For some users, I only want them to be able to view and scroll a portion of the height of the canvas, say 1200-2200. It can vary from user to user, and some will need to see the entire height. I'm at a loss as to whether or not this is even possible, and if so, how.
[flexcoders] Display only part of a canvas??
I have a Canvas that with a height of 3000. For some users, I only want them to be able to view and scroll a portion of the height of the canvas, say 1200-2200. It can vary from user to user, and some will need to see the entire height. I'm at a loss as to whether or not this is even possible, and if so, how.
[flexcoders] Disable Right-Click during Drag
Is there a way to disable the right-click menu while dragging? If not, how do I formally request this? It's pretty annoying to accidently hit the right menu button while dragging. On a laptop, this is a pretty common ocurrence. The drag object can get separated from the cursor, or the drag object gets stuck to the cursor and you have to re-load the application to get rid of it, or the drag object gets dropped in the wrong place.
[flexcoders] Re: External Item Renderer Question
I just went with dispatchEvent, and it's working fine. Thank you for the help!
[flexcoders] External Item Renderer Question
I have an external item renderer (TitleWindow). When the user clicks on the close button of the title window, I need to remove the item render from the tileList dataProvider. I can do this with an internal item renderer, but need to use an external item renderer, but can't figure out how. Thanks, JF.
[flexcoders] Re: External Item Renderer Question
Below is the sample code for the inline renderer that I need to make an external item renderer. Specifically, I need help with this line: outerDocument.buyList.removeItemAt(outerDocument.cart.selectedIndex); Whole item renderer * mx:itemRenderer mx:Component mx:Canvas width=100% height=42 verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ [Embed(source=images/trash.PNG)] public var trash:Class; public function removeItem():void { var newCartTotal:Number = outerDocument.cartTotal; var removePrice:Number = [EMAIL PROTECTED]; var newTotal:Number = newCartTotal - removePrice; outerDocument.buyList.removeItemAt (outerDocument.cart.selectedIndex); outerDocument.total.text = outerDocument.cartFormatter.format(newTotal); outerDocument.cartTotal = newTotal; } ]] /mx:Script mx:Image source=[EMAIL PROTECTED] height=38 width=51 left=0 top=2/ mx:Label text=[EMAIL PROTECTED] left=70 top=0.75 width=67 textAlign=center/ mx:Label text=[EMAIL PROTECTED] left=42 top=20 width=100 textAlign=center/ mx:Button x=145 top=3 bottom=3 icon={trash} click=removeItem();/ /mx:Canvas /mx:Component /mx:itemRenderer
[flexcoders] Re: External Item Renderer Question
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Hey JF, By external, do you mean custom itemRenderer; like in the DataGridColumn tag itemRenderer=myItemRenderer? If so, the same logic should work. Just make sure that buyList is a public variable. However, it's probably better to dispatch an event, from the itemRenderer, that trigers the removal of the item from the dataProvider in the outer class; or the model preferably. If it's a popup, the same holds true. -TH --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: Below is the sample code for the inline renderer that I need to make an external item renderer. Specifically, I need help with this line: outerDocument.buyList.removeItemAt (outerDocument.cart.selectedIndex); Whole item renderer * mx:itemRenderer mx:Component mx:Canvas width=100% height=42 verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ [Embed(source=images/trash.PNG)] public var trash:Class; public function removeItem():void { var newCartTotal:Number = outerDocument.cartTotal; var removePrice:Number = [EMAIL PROTECTED]; var newTotal:Number = newCartTotal - removePrice; outerDocument.buyList.removeItemAt (outerDocument.cart.selectedIndex); outerDocument.total.text = outerDocument.cartFormatter.format(newTotal); outerDocument.cartTotal = newTotal; } ]] /mx:Script mx:Image source=[EMAIL PROTECTED] height=38 width=51 left=0 top=2/ mx:Label text=[EMAIL PROTECTED] left=70 top=0.75 width=67 textAlign=center/ mx:Label text=[EMAIL PROTECTED] left=42 top=20 width=100 textAlign=center/ mx:Button x=145 top=3 bottom=3 icon={trash} click=removeItem();/ /mx:Canvas /mx:Component /mx:itemRenderer
[flexcoders] Re: External Item Renderer Question
Tim, Thank you for the reply! What I mean by external is that it is not an inline itemRenderer, but in a separate MXML file. My buyList array is bindable and public, but the error that I get is Access of undefined property outerDocument. JF --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Hey JF, By external, do you mean custom itemRenderer; like in the DataGridColumn tag itemRenderer=myItemRenderer? If so, the same logic should work. Just make sure that buyList is a public variable. However, it's probably better to dispatch an event, from the itemRenderer, that trigers the removal of the item from the dataProvider in the outer class; or the model preferably. If it's a popup, the same holds true. -TH --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: Below is the sample code for the inline renderer that I need to make an external item renderer. Specifically, I need help with this line: outerDocument.buyList.removeItemAt (outerDocument.cart.selectedIndex); Whole item renderer * mx:itemRenderer mx:Component mx:Canvas width=100% height=42 verticalScrollPolicy=off horizontalScrollPolicy=off mx:Script ![CDATA[ [Embed(source=images/trash.PNG)] public var trash:Class; public function removeItem():void { var newCartTotal:Number = outerDocument.cartTotal; var removePrice:Number = [EMAIL PROTECTED]; var newTotal:Number = newCartTotal - removePrice; outerDocument.buyList.removeItemAt (outerDocument.cart.selectedIndex); outerDocument.total.text = outerDocument.cartFormatter.format(newTotal); outerDocument.cartTotal = newTotal; } ]] /mx:Script mx:Image source=[EMAIL PROTECTED] height=38 width=51 left=0 top=2/ mx:Label text=[EMAIL PROTECTED] left=70 top=0.75 width=67 textAlign=center/ mx:Label text=[EMAIL PROTECTED] left=42 top=20 width=100 textAlign=center/ mx:Button x=145 top=3 bottom=3 icon={trash} click=removeItem();/ /mx:Canvas /mx:Component /mx:itemRenderer
[flexcoders] Re-Center Pop-Up on Resize
Is there a way to re-center a pop-up window if the browser is resized?
[flexcoders] Re: Flex Appointment Calendar Component Release 2 (Beta)
We have officially released Version 2 of ImBizzi Appointment Calendar Flex Component today. Our component is no longer WebORB dependant. While we continue to use WebORB internally and find it simple-to-use and fast, we recognize that there is a wide variety of technologies in use and we wanted to make our component useable by as many people as possible. Please see our website for more information: http://www.imbizzi.com To try out the appointment calendar, please go to: http://www.imbizzi.com/imbizzi.html
[flexcoders] Flex Appointment Calendar Component Release 2 (Beta)
We have been actively working to allow developers to use our component, without having to use WebORB. Our new Beta version has externalized the data integration to allow you to use whatever technology you may wish. You simply query your database and pass the component an Array of appointments, triggering a display update. Below is a link to the beta application. Our goal is to officially release this around August 11th, 2008. Please try it out. If you encounter any issues or have some suggestions to improve the component, please e-mail us: development [at] imbizzi dot com. Beta link: http://www.imbizzi.com/R02Beta01.html Our website: http://www.imbizzi.com
[flexcoders] Re: Flex Appointment Calendar Component
Sorry, I loaded some additional enhancements last night. I've corrected the issue. I meant to load it to my testing site. Sorry for the interruption. --- In flexcoders@yahoogroups.com, Andrew D. Goodfellow [EMAIL PROTECTED] wrote: I get the same error. -Andy On Fri, Jul 18, 2008 at 7:08 AM, Jeremy Anderson [EMAIL PROTECTED] wrote: I'm now getting an error: ReferenceError: Error #1069: Property R918 not found on myComponents.Calendar and there is no default value. at myComponents::Calendar/findMaxColumns() at myComponents::Calendar/resetCounts() at myComponents::Calendar/clearAppointments() at myComponents::Calendar/setDay() at myComponents::Calendar/updateDisplay() at myComponents::Calendar/updateMonthDisplay() at myComponents::Calendar/monthUpdate() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.collections::ListCollectionView/dispatchEvent() at mx.collections::ListCollectionView/http://www.adobe.com/2006/flex/mx/i nternal::reset() at mx.collections::ListCollectionView/set list() at mx.collections::ArrayCollection/set source() at myComponents::Calendar/onResult() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal:: dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::re sultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at NetConnectionMessageResponder/resultHandler() at mx.messaging::MessageResponder/result() On Tue, Jul 15, 2008 at 5:04 PM, Anatole Tartakovsky [EMAIL PROTECTED] wrote: Link includes extra dot in the end - please repost the link Tnx, Anatole On Tue, Jul 15, 2008 at 3:34 PM, jmfillman [EMAIL PROTECTED] wrote: 404? I've had several visitors since posting and it's working. I did post an update to include the price of the component. You may have caught it while I was uploading the new file. --- In flexcoders@yahoogroups.com, Pedro Sena sena.pedro@ wrote: 404 On Tue, Jul 15, 2008 at 1:47 PM, javadmanx rizenine@ wrote: Looks good. --- In flexcoders@yahoogroups.com flexcoders% 40yahoogroups.com, jmfillman jmfillman@ wrote: We have completed our initial work on a Flex Appointment Calendar. The calendar features day, week, and month views. All views are fully drag drop enabled. The day and week view also are drag re- size enabled. You have complete control over all styles, colors, and icons. To try out the component, please visit http://www.imbizzi.com/imbizzi.html. For more information, including tutorials, styling guide, and technical details, please visit http://www.imbizzi.com. For technical questions, please e-mail support [at] imbizzi dot com. JF -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Flex Appointment Calendar Component
We have completed our initial work on a Flex Appointment Calendar. The calendar features day, week, and month views. All views are fully drag drop enabled. The day and week view also are drag re-size enabled. You have complete control over all styles, colors, and icons. To try out the component, please visit http://www.imbizzi.com/imbizzi.html. For more information, including tutorials, styling guide, and technical details, please visit http://www.imbizzi.com. For technical questions, please e-mail support [at] imbizzi dot com. JF
[flexcoders] Re: Flex Appointment Calendar Component
404? I've had several visitors since posting and it's working. I did post an update to include the price of the component. You may have caught it while I was uploading the new file. --- In flexcoders@yahoogroups.com, Pedro Sena [EMAIL PROTECTED] wrote: 404 On Tue, Jul 15, 2008 at 1:47 PM, javadmanx [EMAIL PROTECTED] wrote: Looks good. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, jmfillman jmfillman@ wrote: We have completed our initial work on a Flex Appointment Calendar. The calendar features day, week, and month views. All views are fully drag drop enabled. The day and week view also are drag re-size enabled. You have complete control over all styles, colors, and icons. To try out the component, please visit http://www.imbizzi.com/imbizzi.html. For more information, including tutorials, styling guide, and technical details, please visit http://www.imbizzi.com. For technical questions, please e-mail support [at] imbizzi dot com. JF -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Re: Flex Appointment Calendar Component
Thank you. So much for proper punctuation at the end of my sentences :-) --- In flexcoders@yahoogroups.com, nathanpdaniel [EMAIL PROTECTED] wrote: The link has a . after the .html portion - clicking the link gives a 404, removing the . fixes it. --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: 404? I've had several visitors since posting and it's working. I did post an update to include the price of the component. You may have caught it while I was uploading the new file. --- In flexcoders@yahoogroups.com, Pedro Sena sena.pedro@ wrote: 404 On Tue, Jul 15, 2008 at 1:47 PM, javadmanx rizenine@ wrote: Looks good. --- In flexcoders@yahoogroups.com flexcoders% 40yahoogroups.com, jmfillman jmfillman@ wrote: We have completed our initial work on a Flex Appointment Calendar. The calendar features day, week, and month views. All views are fully drag drop enabled. The day and week view also are drag re-size enabled. You have complete control over all styles, colors, and icons. To try out the component, please visit http://www.imbizzi.com/imbizzi.html. For more information, including tutorials, styling guide, and technical details, please visit http://www.imbizzi.com. For technical questions, please e-mail support [at] imbizzi dot com. JF -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Re: Flex Appointment Calendar Component
Link correction: Demo Site: http://www.imbizzi.com/imbizzi.html More information: http://www.imbizzi.com --- In flexcoders@yahoogroups.com, jmfillman [EMAIL PROTECTED] wrote: We have completed our initial work on a Flex Appointment Calendar. The calendar features day, week, and month views. All views are fully drag drop enabled. The day and week view also are drag re-size enabled. You have complete control over all styles, colors, and icons. To try out the component, please visit http://www.imbizzi.com/imbizzi.html. For more information, including tutorials, styling guide, and technical details, please visit http://www.imbizzi.com. For technical questions, please e-mail support [at] imbizzi dot com. JF
[flexcoders] Centering Embedded Button Image
If I embed an image like this: [Embed(source=images/myImage.gif)] public var myImage:Class; mx:Button id=myButton height=22 width=22 icon={myImage}/ The image is properly centered on the button. However, I need to embed the image via styling, like this: .myButtonStyle{ icon: Embed(source='images/myImage.gif'); width: 22; height: 22; } mx:Button id=myButton styleName=myButtonStyle/ This leaves the image right justified and I need it centered. The image itself is 10x17, and I suppose that I could modify it to fit the dimensions of my button, but I have quite a few images that would have to be modified. JF
[flexcoders] Re: Centering Embedded Button Image
Disregard, I figured this out.
[flexcoders] Re: THIS IS ABSOLUTELY NUTS
Dan, I've often found that I need to delete the old file(s) before uploading the new file to the net. This is either to do with the FTP software and/or the hosting company. If you don't delete it first, sometimes it doesn't overwrite the old file, and it seems some hosting companies have a cache of some type on their servers, and it takes a while for your new file to be what is displayed when browsing to your site. I've seen it take over 1 hour before the new file gets displayed. Deleting the file, however, seems to force it to recognize the new file. JF --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Dan, I can tell you are frustrated, but we really need more information to be much help. Besides telling us how you are deploying the app: * You say, will not compile. How do you know? * Have you tried the command-line compiler? * You say I can develop fine, do you mean you can type code? Nothing else? Tracing? Debugging? * Can you run the modified code under flex builder? * When you say, no error code, where are you looking? * You say, export a release, can you run the modified code in a debug build? * Have you rebooted? * Flex 3? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Flex Frenzy Sent: Tuesday, July 01, 2008 3:11 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] THIS IS ABSOLUTELY NUTS Jake may be right dan, I always have problems with my browser cache. On Jul 1, 2008, at 12:07 PM, Enjoy Jake wrote: Tracy, you rock. Dan, perhaps these suggestions are obvious, but ... when you send it up the the net check the timestamp on the file to make sure you're really sending it up the there. Also, try clearing your browser cache. - Original Message From: Tracy Spratt [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, July 1, 2008 12:11:50 PM Subject: RE: [flexcoders] THIS IS ABSOLUTELY NUTS When you say, send it up the the net, exactly what do you mean? Tracy From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ]On Behalf Of Dan Pride Sent: Tuesday, July 01, 2008 2:06 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] THIS IS ABSOLUTELY NUTS I have an application which will not compile, delivers no error code and simply gives me the last good app with no explanation whatsoever?? ? Who designed this thing and what were they thinking ? Clean app does nothing. No error code No way to get an error code. What does one do??? I can develop fine, but when I go to export a release and send it up the the net, WITHOUT WARNING I JUST KEEP GETTING THE SAME OLD CRAP LIKE I NEVER DID ANYTHING. AGAIN NO WARNING GRR RR
[flexcoders] Re: itemRender Debug Warnings
I totally missed the last post or two on this topic, but I still need to resolve this. The full warning message looks like this, each time the itemRenderer is used: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) warning: unable to bind to property 'toolTip' on class 'Object' (class is not an IEventDispatcher) The itemRenderer looks like this: mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=80 height=18 verticalScrollPolicy=off horizontalScrollPolicy=off mx:Label text={data.display} height=100% width=100% buttonMode=true fontSize=9 color=#535353 toolTip={data.toolTip} textAlign=center/ /mx:Canvas My list is defined like this: mx:List id=lstD0 left=0 top=15 right=0 bottom=0 editable=false horizontalScrollPolicy=off itemRenderer=myComponents.myItemRenderer dataProvider=[]/ The data coming back from the RO call is assiged to the ArrayCollection like this: private function onResult(event:ResultEvent):void { myArrayColl.source = event.result as Array; } I loop through myArrayColl and addItems to the list dataProvider based on certain criteria.
[flexcoders] Re: itemRender Debug Warnings
Thank you Doug! That fixed it. --- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: The issue is that you are creating Objects and adding these Objects to your dataprovider. Objects are not bindable. For a quick fix just do this: var objDG:Object = {itemID: myID, index: myAC[myID].id, display: gridDisplay, toolTip: tipText}; myList.dataProvider.addItem( new ObjectProxy(objDG) ); But it would be much better to get strongly-typed objects back gfrom the server, or convert the items to strongly-typed objects instead of generic Objects. So define a class called MyItem (or whatever) and make it a simple class with bindable properties for itemID, index, display, and toolTip. THen when you get your objects back from the server do this instead: var objDG:MyItem = new MyItem(); obj.itemID = myID; obj.index = myAC[myID].id obj.display = gridDisplay; obj.toolTip = tipText; BTW, I'd argue that storing the index of the item in the collection doesn't belong in the item itself.. Doug myList.dataProvider.addItem( new ObjectProxy(objDG) ); On Thu, Jun 26, 2008 at 4:16 PM, Enjoy Jake [EMAIL PROTECTED] wrote: I'm not sure I understand what the problem is here, but if you're just looking to get rid of the warning you can do text={Object(data).display} - Original Message From: Tracy Spratt [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, June 26, 2008 4:21:46 PM Subject: RE: [flexcoders] Re: itemRender Debug Warnings Dynamic objects, like that in the data property are not bindable. I know how to handle that when I am dealing with XML, but I think you have dynamic objects as items in your AC. No warranty, but try: text={String(data. display)} Tracy -- *From:* [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] *On Behalf Of *jmfillman *Sent:* Thursday, June 26, 2008 6:48 PM *To:* [EMAIL PROTECTED] ups.com *Subject:* [flexcoders] Re: itemRender Debug Warnings I totally missed the last post or two on this topic, but I still need to resolve this. The full warning message looks like this, each time the itemRenderer is used: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) warning: unable to bind to property 'toolTip' on class 'Object' (class is not an IEventDispatcher) The itemRenderer looks like this: mx:Canvas xmlns:mx=http://www.adobe. com/2006/ mxmlhttp://www.adobe.com/2006/mxml width=80 height=18 verticalScrollPolic y=off horizontalScrollPol icy=off mx:Label text={data. display} height=100% width=100% buttonMode= true fontSize=9 color=#535353 toolTip={data. toolTip} textAlign=center / /mx:Canvas My list is defined like this: mx:List id=lstD0 left=0 top=15 right=0 bottom=0 editable=false horizontalScrollPol icy=off itemRenderer= myComponents. myItemRenderer dataProvider= []/ The data coming back from the RO call is assiged to the ArrayCollection like this: private function onResult(event: ResultEvent) :void { myArrayColl. source = event.result as Array; } I loop through myArrayColl and addItems to the list dataProvider based on certain criteria.
[flexcoders] Re: Library Project Help
Is there a good resource/tutorial on Library projects. The process for importing and using seperate mxml files seems to be different from a standard Flex project. For example, I have several popup windows. They are in the same sub- folder as the main file of the component. In a standard project, the component and the project can find the popup windows just fine. In the Library Project, those files are not found, generating a could not find source for class... error. I need to resolve the issue, but I also need to understand why and what is the best practice. Thank you. --- In flexcoders@yahoogroups.com, jmfillman [EMAIL PROTECTED] wrote: That resolved that issue, and created another, similar issue :-) I'm using some popUp titleWindows. I import them into the component like this: import myComponents.popUp1; And then I launch the PopUp like this: var popWindow1:popUp1; The Library Project generates the following error: could not find source for class myLibrarySource.myComponents.popUp1.myProject_Library --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: For itemRenderers I believe you have to specify the full class name. So, move the files to the subfolder and change the itemRenderer value to MyComponents.itemRenderer1 jmfillman wrote: From my component mxml file in the myComponents sub-folder, I am referencing the itemRendere like this: mx:List left=55 top=40 right=35 height=22 id=all0List textAlign=center visible=false dataProvider={list0Array} backgroundColor=#535353 borderStyle=none themeColor=#535353 itemClick=modifyAD(all0List.selectedItem.index, true) itemRenderer=itemRenderer1 itemRollOver=rollOver(event); contextMenu=cm itemRollOut=contextMenu=null/ If I put the itemRenderer in the same folder as the component, I get a build error that it can't find itemRenderer1. If I put it in the root of the src folder, one level above the component, it works perfectly, but then the Library Project can't find it. --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: I'm not sure why that would be. Maybe if you shared some code the problem would be more obvious. jmfillman wrote: Only the itemRenderes are in the root directory. If I put them in the sub-Folder (myComponents), then the components in the sub- Folder cannot find the itemRenders. --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: Assuming Flex Builder 3; src shouldn't be included in the path. So your path is just itemRenderer1. I would recommend against putting components in the root directory in this manner. jmfillman wrote: I'm creating a Library Project that is linked to my working project. My Build Path links to the src folder from my working project, and I have selected all the relevant files, including my 2 itemRenderers. Within the src file, I have a folder that contains 3 component mxml files, and the 2 itemRenderers are at the src level. My Library Project returns the following error for the itemRenderers in the Library Project: could not find source for class src.itemRenderer1. src (folder) itemRenderer1.mxml itemRenderer2.mxml myComponents (folder) component1.mxml component2.mxml component3.mxml Why? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379
[flexcoders] Dispatch Event in PopUp TitleWindow
How do I manually trigger an event, in a popup window, from the parent application? For example: In my parent application: myPopUp.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); In the popup window: btnSearch.addEventListener(MouseEvent.CLICK, onClick, false, 0, true); How do I make this work?
[flexcoders] Re: Library Project Help
Only the itemRenderes are in the root directory. If I put them in the sub-Folder (myComponents), then the components in the sub-Folder cannot find the itemRenders. --- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote: Assuming Flex Builder 3; src shouldn't be included in the path. So your path is just itemRenderer1. I would recommend against putting components in the root directory in this manner. jmfillman wrote: I'm creating a Library Project that is linked to my working project. My Build Path links to the src folder from my working project, and I have selected all the relevant files, including my 2 itemRenderers. Within the src file, I have a folder that contains 3 component mxml files, and the 2 itemRenderers are at the src level. My Library Project returns the following error for the itemRenderers in the Library Project: could not find source for class src.itemRenderer1. src (folder) itemRenderer1.mxml itemRenderer2.mxml myComponents (folder) component1.mxml component2.mxml component3.mxml Why? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Re: Library Project Help
From my component mxml file in the myComponents sub-folder, I am referencing the itemRendere like this: mx:List left=55 top=40 right=35 height=22 id=all0List textAlign=center visible=false dataProvider={list0Array} backgroundColor=#535353 borderStyle=none themeColor=#535353 itemClick=modifyAD(all0List.selectedItem.index, true) itemRenderer=itemRenderer1 itemRollOver=rollOver(event); contextMenu=cm itemRollOut=contextMenu=null/ If I put the itemRenderer in the same folder as the component, I get a build error that it can't find itemRenderer1. If I put it in the root of the src folder, one level above the component, it works perfectly, but then the Library Project can't find it. --- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote: I'm not sure why that would be. Maybe if you shared some code the problem would be more obvious. jmfillman wrote: Only the itemRenderes are in the root directory. If I put them in the sub-Folder (myComponents), then the components in the sub-Folder cannot find the itemRenders. --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: Assuming Flex Builder 3; src shouldn't be included in the path. So your path is just itemRenderer1. I would recommend against putting components in the root directory in this manner. jmfillman wrote: I'm creating a Library Project that is linked to my working project. My Build Path links to the src folder from my working project, and I have selected all the relevant files, including my 2 itemRenderers. Within the src file, I have a folder that contains 3 component mxml files, and the 2 itemRenderers are at the src level. My Library Project returns the following error for the itemRenderers in the Library Project: could not find source for class src.itemRenderer1. src (folder) itemRenderer1.mxml itemRenderer2.mxml myComponents (folder) component1.mxml component2.mxml component3.mxml Why? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Re: Library Project Help
That resolved that issue, and created another, similar issue :-) I'm using some popUp titleWindows. I import them into the component like this: import myComponents.popUp1; And then I launch the PopUp like this: var popWindow1:popUp1; The Library Project generates the following error: could not find source for class myLibrarySource.myComponents.popUp1.myProject_Library --- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote: For itemRenderers I believe you have to specify the full class name. So, move the files to the subfolder and change the itemRenderer value to MyComponents.itemRenderer1 jmfillman wrote: From my component mxml file in the myComponents sub-folder, I am referencing the itemRendere like this: mx:List left=55 top=40 right=35 height=22 id=all0List textAlign=center visible=false dataProvider={list0Array} backgroundColor=#535353 borderStyle=none themeColor=#535353 itemClick=modifyAD(all0List.selectedItem.index, true) itemRenderer=itemRenderer1 itemRollOver=rollOver(event); contextMenu=cm itemRollOut=contextMenu=null/ If I put the itemRenderer in the same folder as the component, I get a build error that it can't find itemRenderer1. If I put it in the root of the src folder, one level above the component, it works perfectly, but then the Library Project can't find it. --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: I'm not sure why that would be. Maybe if you shared some code the problem would be more obvious. jmfillman wrote: Only the itemRenderes are in the root directory. If I put them in the sub-Folder (myComponents), then the components in the sub- Folder cannot find the itemRenders. --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: Assuming Flex Builder 3; src shouldn't be included in the path. So your path is just itemRenderer1. I would recommend against putting components in the root directory in this manner. jmfillman wrote: I'm creating a Library Project that is linked to my working project. My Build Path links to the src folder from my working project, and I have selected all the relevant files, including my 2 itemRenderers. Within the src file, I have a folder that contains 3 component mxml files, and the 2 itemRenderers are at the src level. My Library Project returns the following error for the itemRenderers in the Library Project: could not find source for class src.itemRenderer1. src (folder) itemRenderer1.mxml itemRenderer2.mxml myComponents (folder) component1.mxml component2.mxml component3.mxml Why? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Library Project Help
I'm creating a Library Project that is linked to my working project. My Build Path links to the src folder from my working project, and I have selected all the relevant files, including my 2 itemRenderers. Within the src file, I have a folder that contains 3 component mxml files, and the 2 itemRenderers are at the src level. My Library Project returns the following error for the itemRenderers in the Library Project: could not find source for class src.itemRenderer1. src (folder) itemRenderer1.mxml itemRenderer2.mxml myComponents (folder) component1.mxml component2.mxml component3.mxml Why?
[flexcoders] Re: Context Menu Use in PopUp
Well, yes. The menuItem has an event listener in the parent application that calls a function. I solved it. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: By functions do you mean event listeners? How are you setting it up? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Friday, June 13, 2008 10:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Context Menu Use in PopUp I have a ContextMenu in my parent application. I can make the same ContextMenu show in a popup titleWindow, however, the functions do not fire when clicked in the popup. How can I do this?
[flexcoders] Re: DataGrid scroll size on data load
I have horizontalScrollPolicy=on, which doesn't make a difference. The field gets cut off whether on, off, or auto. My issue is knowing how big to set the column, based on the data. My preference would be a column itemRenderer using a TextArea with word wrap, but that doesn't appear to work either. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: You can set column sizes whenever you feel like it, but if you have hScrollPolicy=off, the other columns may adjust since all columns must fit on screen under that policy. If you look in the archives, several folks have struggled with it. To determine the exact size for a column requires visiting every row in the data which is expensive so having some other way is recommended. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, June 10, 2008 8:21 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid scroll size on data load When I load data into a DataGrid, the right most field often gets cut off. The column widths are set when the application loads. The question is, how do I make it expand dynamically to adjust to the width of the longest field in the column?
[flexcoders] Re: DataGrid scroll size on data load
Thank you! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Just set wordWrap=true on the column? And variableRowHeight=true? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, June 10, 2008 11:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid scroll size on data load I have horizontalScrollPolicy=on, which doesn't make a difference. The field gets cut off whether on, off, or auto. My issue is knowing how big to set the column, based on the data. My preference would be a column itemRenderer using a TextArea with word wrap, but that doesn't appear to work either. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: You can set column sizes whenever you feel like it, but if you have hScrollPolicy=off, the other columns may adjust since all columns must fit on screen under that policy. If you look in the archives, several folks have struggled with it. To determine the exact size for a column requires visiting every row in the data which is expensive so having some other way is recommended. From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of jmfillman Sent: Tuesday, June 10, 2008 8:21 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] DataGrid scroll size on data load When I load data into a DataGrid, the right most field often gets cut off. The column widths are set when the application loads. The question is, how do I make it expand dynamically to adjust to the width of the longest field in the column?
[flexcoders] DataGrid scroll size on data load
When I load data into a DataGrid, the right most field often gets cut off. The column widths are set when the application loads. The question is, how do I make it expand dynamically to adjust to the width of the longest field in the column?
[flexcoders] SWF Size Concerns
I have a good sized application (around 433 KB). I just added a TitleWindow component with 37 lines of code and no imbedded assets, and was surprised when the SWF size jumped about 102 KB, to 535 KB (using Release Build). Am I better off creating an view inline state instead of using a component? It seems so out of proportion. The main application is a few thousand lines, with plenty of imbedded images, and this little TitleWindow increases my file size by nearly 25%.
[flexcoders] Re: SWF Size Concerns
I do have another TitleWindow component in use. Don't recall exactly, but it didn't seem like that significant of a jump when I added the first one a few months back. --- In flexcoders@yahoogroups.com, Daniel Gold [EMAIL PROTECTED] wrote: did you have any TitleWindows previously? My guess is the code size increase is due to extra components from the framework library being compiled into your project. Add another TitleWindow component that is similar and see what the code size increase. From some other applications I've worked with in Flex, I've seen that the SWF size seems to plateau around 1.2kb or so and crawls from there even if I add some complex custom components, at some point it's just compiled code once you've used most of the available components. On Mon, Jun 9, 2008 at 5:24 PM, jmfillman [EMAIL PROTECTED] wrote: I have a good sized application (around 433 KB). I just added a TitleWindow component with 37 lines of code and no imbedded assets, and was surprised when the SWF size jumped about 102 KB, to 535 KB (using Release Build). Am I better off creating an view inline state instead of using a component? It seems so out of proportion. The main application is a few thousand lines, with plenty of imbedded images, and this little TitleWindow increases my file size by nearly 25%.
[flexcoders] Re: SWF Size Concerns
It's caused by the AdvancedDataGrid control. That's surprisingly large. Guess I'll be sticking with a list or regular DataGrid. --- In flexcoders@yahoogroups.com, Daniel Gold [EMAIL PROTECTED] wrote: did you have any TitleWindows previously? My guess is the code size increase is due to extra components from the framework library being compiled into your project. Add another TitleWindow component that is similar and see what the code size increase. From some other applications I've worked with in Flex, I've seen that the SWF size seems to plateau around 1.2kb or so and crawls from there even if I add some complex custom components, at some point it's just compiled code once you've used most of the available components. On Mon, Jun 9, 2008 at 5:24 PM, jmfillman [EMAIL PROTECTED] wrote: I have a good sized application (around 433 KB). I just added a TitleWindow component with 37 lines of code and no imbedded assets, and was surprised when the SWF size jumped about 102 KB, to 535 KB (using Release Build). Am I better off creating an view inline state instead of using a component? It seems so out of proportion. The main application is a few thousand lines, with plenty of imbedded images, and this little TitleWindow increases my file size by nearly 25%.
[flexcoders] Re: Flex + WebORB for PHP, A very strage problem
Manu, First thing I'd do is trace (list[i].aircon) or bind the ArrayCollection to a dataGrid to see what is actually being returned. My suspicion is that you are getting the correct true and false data in the result, but as Uber_Nick suggested, it's a string value, so you'll need to add an if statement, like this: if (list[i].aircon == 'true') { vo.aircon = true; } else if (list[i].aircon == 'false') { vo.aircon = false; } JF --- In flexcoders@yahoogroups.com, Manu Dhanda [EMAIL PROTECTED] wrote: Hii.. Anyone of you experts with a solution for my problem?? Am really worried for this little boolean problem. Manu. Uber_Nick wrote: Manu, Note the following. trace(Boolean('TRUE')); // returns true trace(Boolean('FALSE')); // also returns true Flex is interpreting the result from your PHP call as a String. Try returning lower-case 'true' and 'false'. Also, try using: list[i].aircon as Boolean instead of: Boolean(list[i].aircon) The former will not always convert to true (but will return null if it can't convert). Lastly, if you can't make it work, just try this workaround: vo.aircon = (''+list[i].aircon).toLowerCase()=='true'; -Nick Matelli Amentra, Inc --- In flexcoders@yahoogroups.com, Manu Dhanda manuraj.dhanda@ wrote: Code for my Responder, where I am receiving the result: public function result(data:Object):void { //TODO: implement function var objList:ArrayCollection = new ArrayCollection(); var list:ArrayCollection = new ArrayCollection (data.result as Array); var vo:FlatVO; for(var i:int=0; ilist.length; i++){ vo = new FlatVO(); vo.userId = int(list[i].userId); vo.aircon = Boolean(list[i].aircon); objList.addItem(vo); } In here, I supposed to get vo.aircon as boolean[values as true/false for different rows/objects in FlatVO]. But, the strange thing is that I am receiving all the values for my boolean type as TRUE only. I had verified on my server side PHP code, and it is returning the corresponding values fine [as in TRUE and FALSE accordingly]. I am using WebORB for PHP with Flex. and in there, I had verified in the Services as well, that my service returning this object has the right values. Then how come I am receiving all the values as TRUE, I can not understand this. Any help will be great. Thanks. Igor Costa-2 wrote: If you paste a part of your code someone here in the list can answer you but it's hard to get what you really need. Regards Igor On Tue, Jun 3, 2008 at 11:45 AM, Manu Dhanda manuraj.dhanda@ wrote: Hii, In short, In Weborb Mgmt Services, I can see the object having a value of boolean type correctly.( that is it is returned correctly from the db). But when I receive it on Flex side, all is returned as true. How should I resolve this? Appreciate your time.. to respond it. thanks. -- View this message in context: http://www.nabble.com/Flex-%2B-WebORB-for-PHP%2C-A-very-strage- problem-tp17625304p17625304.html Sent from the FlexCoders mailing list archive at Nabble.com. -- Igor Costa www.igorcosta.com www.igorcosta.org -- View this message in context: http://www.nabble.com/Flex-%2B-WebORB-for-PHP%2C-A-very-strange- problem-tp17625304p17631029.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Flex-%2B-WebORB- for-PHP%2C-A-very-strange-problem-tp17625304p17672147.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Login Screen an data format usage
My personal preference is remoting using WebORB. Pretty easy to use, and fast. About the login screen, without going into a lot of detail, you simply submit the username/password to whatever data option you go with. In Flex, you are listening for a result from the data query for success. If successful, you can trigger a State change, or wherever you want to send the user. If you need more detail, I may have one somewhere. Haven't used it in about a year, so I'd have to go looking for it. JF --- In flexcoders@yahoogroups.com, Deniz Davutoglu [EMAIL PROTECTED] wrote: Hello I wonder how can create login screen with flex, also which format is more usible for daha exhcange, remoting, json, xml? Thanks
[flexcoders] Re: hiding a cell within a datagrid dynamically
Anthony, If you are passing the data from the columns of each row to the itemRenderer, you should be able to set visibility conditions from the itemRenderer. If you post your code, I or someone else here might be able to provide a more specific suggestion. JF --- In flexcoders@yahoogroups.com, anthony_morsey [EMAIL PROTECTED] wrote: I have a datagrid with multiple columns and rows. One of the columns contains a checkbox which is rendered with an itemRenderer. I'd like to conditionally hide some of these checkboxes based on values from other columns with the same row. Any ideas? Thanks
[flexcoders] Re: SWC Encrypt 2.0 - Does it work?
I understand that you can't ever protect your code from everyone. If someone really wants to get the code they will figure it out, eventually. I'm looking to make it hard enough that most people won't bother. I have looked at nitrolm.com, and for me, I'm hesitant to use it for a variety of reasons, but it's an intriguing approach. - In flexcoders@yahoogroups.com, andrewwestberg [EMAIL PROTECTED] wrote: shameless_product_plug nitrolm.com has a new feature I'm working on that allows you to encrypt flex/AIR mx:ModuleLoader swfs using public/private keys. You write a modular application (or just put most everything in one module). After that, encrypt using NitroLM's AssetEncrypter tool and change your tags to nitrolm:EncryptedModuleLoader. The code in the module is protected from decompiling because the decryption key is stored on the nitrolm server cluster and only delivered to the client after a valid NitroLM authentication. I will be at 360 flex in San Jose, so if you want to see it in action, stop by the Simplified Logic booth. /shameless_product_plug The advantage I see in doing true encryption over obfuscation is that the code the user runs is the same that you developed. With obfuscation, you have to worry about bugs introduced by the obfuscator and cryptic stack traces to figure out when runtime errors do happen to occur. -Andrew --- In flexcoders@yahoogroups.com, Cato Paus cato1@ wrote: Hello again everyone, how can we protect our code? How should we go forward in order to protect the methods used to change the senistive information on user data, some blogs on this? I found one at a remote-finfig.xml and the use of session id http://www.flexpasta.com/index.php/2008/03/18/flex-using-blazeds- with-ja\ va-do-you-care-about-security/ http://www.flexpasta.com/index.php/2008/03/18/flex-using-blazeds- with-j\ ava-do-you-care-about-security/ this is good to have this thread hope we can work together to find out of this :) --- In flexcoders@yahoogroups.com, jmfillman jmfillman@ wrote: Has anyone had experience using SWC Encrypt 2.0, by Amayeta? Does it work, or would I just be wasting my money? I'm trying to protect a component I plan to sell, but given the prevalence of de- compilers, I'm hesitant to release it. I don't want to see all my hard work stolen.
[flexcoders] List rollOver event item
How do I identify the item in the list that the mouse rollOver event triggers? The selectedItem and selectedIndex fields won't contain the correct value, so what do I use? Thanks...JF
[flexcoders] Re: SWC Encrypt 2.0 - Does it work?
Thank you for the information Doug! Very helpful. JF --- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: That last comment isn't true. The Sothink decompiler works just fine on Flex swfs. Here's my experience with SWF Encrypt and SWC Encrypt: - We ran SWCEncrypt on a Flex SWC and then tried decompiling a Flex app created with the encrypted SWC versus the unencrypted SWC. I could not tell any difference whatsoever. Both decompiled just fine, it appeared as if SWCEncrypt did absolutely nothing to the SWC file. I don't know if we were doing soemthing wrong (although really how can you? you just run it on a SWC), or if the encryptor doesn't support Flex SWCs specifically. - SWFEncrypt, on the other hand, works. But it does not work for Flex swfs. If you try to encrypt a full Flex SWF the encryptor goes overboard and jacks up the Flex framework code and makes your SWF unrunnable. - What did seem to work was creating a SWF module that did not include the Flex framework code, encrypting that, and loading that module into a wrapper Flex app. - Neither SWCEncrypt nor SWFEncrypt seems to actually encrypt anything, All of it can still be decompiled with the Sothink decompiler (maybe the decompiler just knows how to decrypt whatever encryption is used). SWFEncrypt does seem to obfuscate the code though. A decompiled SWF that has been run through SWFEncrypt is harder to read than a non- obfuscated one. On Tue, Jun 3, 2008 at 11:49 AM, Cato Paus [EMAIL PROTECTED] wrote: right now the Flex framework is too much to decode. decoders only hang that I know of --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: On Monday 02 Jun 2008, jmfillman wrote: Has anyone had experience using SWC Encrypt 2.0, by Amayeta? Does it work, or would I just be wasting my money? Have you tried decompiling a swfencrypt'ed SWF ? -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] SWC Encrypt 2.0 - Does it work?
Has anyone had experience using SWC Encrypt 2.0, by Amayeta? Does it work, or would I just be wasting my money? I'm trying to protect a component I plan to sell, but given the prevalence of de-compilers, I'm hesitant to release it. I don't want to see all my hard work stolen.
[flexcoders] Re: SWC Encrypt 2.0 - Does it work?
Josh, I couldn't disagree more. If you wrote a component that saves me time and/or money, or provides value to my users, it'd be silly, and a waste of time and money, for me to go and develop it myself. Since you saved me time and/or money, you also deserve to be fairly compensated, if you want to receive $$ for your work. I don't have the resources to go after anyone who might de-compile the code, especially internationally. That's just lost money. JF --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: *sigh* Release it, maybe you'll sell some, maybe many amateurs who would never pay will pirate it, maybe one or two professionals will pirate it. Don't release it, your hard work can stay safe, and you'll never sell a copy. Personally, if it doesn't summon Jesus I think you'll need some luck selling a component without source. This is why we have lawyers and contracts. -J On Tue, Jun 3, 2008 at 7:04 AM, Michel Scoz [EMAIL PROTECTED] wrote: I mostly used it for Flash SWF files, and it work wonders as far as I know. At least, no incompatibility problem and/or decompilers being able to show/see the code. -- *De:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *Em nome de *jmfillman *Enviada em:* segunda-feira, 2 de junho de 2008 17:59 *Para:* flexcoders@yahoogroups.com *Assunto:* [flexcoders] SWC Encrypt 2.0 - Does it work? Has anyone had experience using SWC Encrypt 2.0, by Amayeta? Does it work, or would I just be wasting my money? I'm trying to protect a component I plan to sell, but given the prevalence of de- compilers, I'm hesitant to release it. I don't want to see all my hard work stolen. -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Dynamic Rectangle Drawing
The drawing and geometry stuff is foreign enough to me that everything I've tried has failed miserably :-( When a user clicks and drags inside a canvas, I need to draw a rectangle that is dynamically sized vertically (fixed width) with their mouse movements, whether the movement is a positive or negative movement from the point of initiation. On mouseUp, I need to capture the x and y positions and the height of the rectangle. Anyone have some sample code or a good tutorial that can give me an idea of how to accomplish this?
[flexcoders] Re: Wierd behaviour with selectedItem on Datagrid
Not sure if this is a bug, kind of looks like it, but you can prevent this by doing this: mx:DataGrid id=dg dataProvider={array} itemClick=dg.selectedItem = array[dg.selectedIndex]; ck(event) --- In flexcoders@yahoogroups.com, shafram [EMAIL PROTECTED] wrote: Hello I am encountering a strange problem when I try to select an item after an initial sort order has been provided. In this example, I have 5 items with all the same count. My initial sorting is on the count field. Once the initial sort has been set, I programmatically select the 4th item in my array which is Letter D. If I then try to click on Letter A which is right above D, The alert box will display D not A in Flex 3. In flex 2 the event.target.selectedItem is null and an exception is thrown. Here is the source code. Am I doing something wrong or is this a bug in flex? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=cc() mx:Script ![CDATA[ import mx.controls.Alert; import mx.events.ListEvent; import mx.collections.SortField; import mx.collections.Sort; import mx.collections.ArrayCollection; [Bindable] private var array : ArrayCollection ; private function cc() : void{ array = new ArrayCollection([ {count : 1207662300, wp : A}, {count : 1207662300, wp : B}, {count : 1207662300, wp : C}, {count : 1207662300, wp : D}, {count : 1207662300, wp : E} ]); var sorting : Sort = new Sort(); var sortByCount : SortField = new SortField(count,false,true,true); sorting.fields = [sortByCount]; this.array.sort = sorting; this.array.refresh(); dg.selectedItem = array[3]; } private function ck(event : ListEvent) : void { Alert.show(event.target.selectedItem.wp); } ]] /mx:Script mx:DataGrid id=dg dataProvider={array} itemClick=ck (event) mx:columns mx:DataGridColumn headerText=Count dataField=count/ mx:DataGridColumn headerText=Letter dataField=wp/ /mx:columns /mx:DataGrid /mx:Application
[flexcoders] Re: need help to create anchor in flex
I would go with states, ViewStack, Accordian, or a TabNavigator. States or ViewStack are probably the closest to how this site is set up. When you click a link, it appropriate state or ViewStack page is displayed. --- In flexcoders@yahoogroups.com, sonnygett [EMAIL PROTECTED] wrote: Hello guys,I'm stuck with idea how to create an anchor link in flex that will be look like this http://www.w3.org/TR/html401/struct/links.html,hope someone can help me about this.huge thanks.
[flexcoders] Container ScrollBar Click vs Container Click
Is there an effective way to determine a click on a scroll bar versus a click on the container? mx:Canvas height=200 width=200 verticalScrollPolicy=auto click=containerClick()/ I only want the click event to fire for the container if the click was NOT on the scrollBar, if the scrollBar exists. I know that I can check the container mouseX value and generally tell whether or not the scrollBar was clicked (assuming the contents of the container require a scrollBar), but that isn't fool proof, depending on whether or not there is a scrollBar. The FlashPlayer certainly can tell the difference, since it knows when to scroll and when not to scroll, based on where the user clicks. Seems the container class controls should have a couple more event triggers: verticalScrollClick and horizontalScrollClick
[flexcoders] Re: Finding a Calendar component using database
I'm working on a Scheduling/Calendar component that is DB driven. You can view and interact with the component by visiting http://www.imbizzi.com. Once there, you can click on the More Information button for additional details and contact information. I would also appreciate your feedback on the component, what you like, what you don't, what features you'd like to see, etc. All feedback is welcome, as long as it is constructive. JF --- In flexcoders@yahoogroups.com, txakin [EMAIL PROTECTED] wrote: I´m finding a calendar component like i have seen in some url : http://www.flex-flex.net/flex/Calendar/Calendar.html But all my events i would like to save in my database Someone has implemented something like that. Thanks in advance
[flexcoders] itemRender Debug Warnings
Since implementing some itemRenderers, I've been getting warnings, in Debug mode, that read like this: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) From what I've been able to find on the www, is that this is related to setting RemoteObject results to an array, like this: myAC.source = event.result as Array; Question is, how to I do this correctly to prevent all those warnings?
[flexcoders] Re: itemRender Debug Warnings
Thank you for the reply Tracy! So instead of adding the items to the list as an Object I should..? var objDG:Object = {itemID: myID, index: myAC[myID].id, display: gridDisplay, toolTip: tipText}; myList.dataProvider.addItem(objDG); --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Neither Array nor Object are bindable, they do not dispatch the necessary events. Wrap your Array in an ArrayCollection. One other cause of this warning is when you have a bindable object that you reference through a property typed as Object, as with selectedItem, currentItem, data, getRepeaterItem(), etc. In that case you can convert or cast the Object to the true data type to prevent the warnings. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] itemRender Debug Warnings Since implementing some itemRenderers, I've been getting warnings, in Debug mode, that read like this: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) From what I've been able to find on the www, is that this is related to setting RemoteObject results to an array, like this: myAC.source = event.result as Array; Question is, how to I do this correctly to prevent all those warnings?
[flexcoders] Re: showcase
Based on how the items load as you scroll up and down, this would appear to be done using a List or TileList component using an itemRenderer. This could be done from an XML file. Clicking on an item probably changes to a different View State. --- In flexcoders@yahoogroups.com, mcmoisei [EMAIL PROTECTED] wrote: Hello, I'm looking for the source code of a large application such as http://flex.org/showcase/ Anyone can gimme a hint how is done ? I think would be extremely beneficial to the community if such source would be available. I'm joining RIA word from the lame world of request-response where the approach is different.
[flexcoders] Re: Complex itemEditEnd processing confuses subsequent rowIndex on click
Let me see if I understand this. You are saying that if you are editing selectedIndex 3, and then you click, for example, on index 4, that you are getting index 5 instead of 4, correct? Do you get the data from index 4 or 5? When you update data in the DG, don't you need to refresh the DG? --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: My flag solution works fine, so don't stress on this one unless you are just interested. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Tuesday, May 06, 2008 7:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Complex itemEditEnd processing confuses subsequent rowIndex on click In a component's editable Datagrid's itemEditEnd handler, I update a data model instance, which dispatches events that invoke a ChangeWatcher handler back in that same component. That handler assigns a new XMLListCollection to the local var to which the editable dataGrid is bound. The handler also sets the selectedIndex of the DG to the just edited row. This all works fine if I end the editing session using Tab or Enter or Escape, but if I click in the next row, something confuses the rowIndex of the click, and the next row's cell is put in edit mode instead of the one clicked. So far I have been unable to repro this in a test app (quit because of time issues), but it occurs both places that I use this methodology. I also have found that there is some kind of event tangle. When my change handler is invoked and re-assigns the DG dataProvider, we are still within the itemEditEnd handler, but assigning the DP causes us to hit the itemEditend handler AGAIN, recursively. I am about ready to just set a flag and conditionally skip the problem code, but any other ideas will be appreciated. I'll post some snippets below. Tracy Tracing: onEditEnd() //value updated, click in 2nd row(index 1),itemEditEnd handler called ..onEditEnd rowIndex=0 // changeProjItemData()//updates the data model onXmlProjItemsChange: //ChangeWatcher handler ..-- here we assign the dg dataProvider -- onEditEnd() //UNEXPECTED call to itemEditEnd handler ..onEditEnd rowIndex=0 selectItemByIndex( 0) onSelectItem//called by DG change event handler, 2nd row(index 1) clicked ..set _iSelectedIndex to row clicked=2 //WRONG index, clicked index 1 ..-- here , the 3rd row is set to editable, not the 2nd as clicked Snippets: /**This gets fired when the itemEditor is about to be destroyed. */ private function onEditEnd(event:DataGridEvent):void { trace(.ProjItem.onEditEnd()) var sPropertyName:String = event.dataField; //get the dataField var sValue:String = TextInput(event.currentTarget.itemEditorInstance).text; //and value trace(.onEditEnd rowIndex= + event.rowIndex ) if (_xmlProjItem[sPropertyName] != sValue) {//if value changed changeProjItemData(sPropertyName,sValue) event.preventDefault(); } }//onEditEnd /** Sets required save flags, updates the local value, and updates the data model */ private function changeProjItemData(sPropertyName:String, sValue:String):void { trace(.ProjItem.changeProjItemData()) if (sPropertyName sValue) { [EMAIL PROTECTED] = true; //flas for save _xmlProjItem[sPropertyName] = sValue; [EMAIL PROTECTED] = true; [EMAIL PROTECTED] = true; //required for SAVE! [EMAIL PROTECTED] = true; // [EMAIL PROTECTED] = true; _dsApp.xmlProjItems = _xmlProjItems; //Update the data model. Invokes change handler } }//changeProjItemData /** changeWatcher handler on DSApp.xmlProjItems */ private function onXmlProjItemsChange( event:PropertyChangeEvent ):void { trace(...Project.onXmlProjItemsChange:) var xml:XML = event.newValue as XML; if (xml) { _xmlProjItems = xml.copy(); _xlcProjItems = new XMLListCollection(_xmlProjItems.children().(attribute(rowaction)! =del ete)); //dgProjItem dataProvider selectItemByIndex(_iSelectedIndex); } else { _xmlProjItems = DocumentElement /; _xmlProjItem = null; _xlcProjItems = new XMLListCollection(_xmlProjItems.ProjItem); } }//onXmlProjItemsChange /** Run by change event of dgProjItem */ private function onSelectItem(event:Event):void { trace(.projItem.onSelectItem -- current _iSelectedIndex = + _iSelectedIndex) _xmlProjItem = XML(event.target.selectedItem); //set local var _iSelectedIndex = event.target.selectedIndex; //store index trace(set _iSelectedIndex to row
[flexcoders] Re: itemRender Debug Warnings
It's a standard List component. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: What is the dataProvider? What data type? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:47 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: itemRender Debug Warnings Thank you for the reply Tracy! So instead of adding the items to the list as an Object I should..? var objDG:Object = {itemID: myID, index: myAC[myID].id, display: gridDisplay, toolTip: tipText}; myList.dataProvider.addItem(objDG); --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Tracy Spratt tspratt@ wrote: Neither Array nor Object are bindable, they do not dispatch the necessary events. Wrap your Array in an ArrayCollection. One other cause of this warning is when you have a bindable object that you reference through a property typed as Object, as with selectedItem, currentItem, data, getRepeaterItem(), etc. In that case you can convert or cast the Object to the true data type to prevent the warnings. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:14 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] itemRender Debug Warnings Since implementing some itemRenderers, I've been getting warnings, in Debug mode, that read like this: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) From what I've been able to find on the www, is that this is related to setting RemoteObject results to an array, like this: myAC.source = event.result as Array; Question is, how to I do this correctly to prevent all those warnings?
[flexcoders] Re: itemRender Debug Warnings
To be more thorough in my response, I loop through the data in an ArrayCollection to create this Object that I then add to a List component. --- In flexcoders@yahoogroups.com, jmfillman [EMAIL PROTECTED] wrote: It's a standard List component. --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: What is the dataProvider? What data type? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:47 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: itemRender Debug Warnings Thank you for the reply Tracy! So instead of adding the items to the list as an Object I should..? var objDG:Object = {itemID: myID, index: myAC[myID].id, display: gridDisplay, toolTip: tipText}; myList.dataProvider.addItem(objDG); --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Tracy Spratt tspratt@ wrote: Neither Array nor Object are bindable, they do not dispatch the necessary events. Wrap your Array in an ArrayCollection. One other cause of this warning is when you have a bindable object that you reference through a property typed as Object, as with selectedItem, currentItem, data, getRepeaterItem(), etc. In that case you can convert or cast the Object to the true data type to prevent the warnings. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:14 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] itemRender Debug Warnings Since implementing some itemRenderers, I've been getting warnings, in Debug mode, that read like this: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) From what I've been able to find on the www, is that this is related to setting RemoteObject results to an array, like this: myAC.source = event.result as Array; Question is, how to I do this correctly to prevent all those warnings?
[flexcoders] Re: Complex itemEditEnd processing confuses subsequent rowIndex on click
It seems you are content to stick with the workaround, but I'm curious if you are getting the data from index 4, even though it's saying index 5, or if you are getting the data associated with index 5. I've seen this where the selectedIndex was 5, but the data was from the old index 5 (now 4 or 6), which really does mess things up. I've had to go and programatically clear the DG and re-assign the dataProvider to keep things consistent, but that's not problem free when inserting into the DG. Frustrating :-) --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: That is correct. I am getting index 5, all the way. Even the DataGridEvent.rowIndex reports 5. I have not been able to catch index 4 anywhere. I even considered a mouseDown handler. And the DataGrid refresh is what is causing the problem, that happens when I assign the _xlcProjItems = new XMLListCollection() WITHIN an editing session. It is a pretty complex series of actions, ending an edit session by clicking another row, and by adding in the data model update and dataProvider re-assignment, it just is nuts. I am now setting a flag in the itenEditEnd handler, and NOT calling preventDefault. In my hangeWatcher handler, if I am in an edit session, I do not re-assign the dataProvider. Seems to work fine. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 7:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Complex itemEditEnd processing confuses subsequent rowIndex on click Let me see if I understand this. You are saying that if you are editing selectedIndex 3, and then you click, for example, on index 4, that you are getting index 5 instead of 4, correct? Do you get the data from index 4 or 5? When you update data in the DG, don't you need to refresh the DG? --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Tracy Spratt tspratt@ wrote: My flag solution works fine, so don't stress on this one unless you are just interested. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of Tracy Spratt Sent: Tuesday, May 06, 2008 7:31 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Complex itemEditEnd processing confuses subsequent rowIndex on click In a component's editable Datagrid's itemEditEnd handler, I update a data model instance, which dispatches events that invoke a ChangeWatcher handler back in that same component. That handler assigns a new XMLListCollection to the local var to which the editable dataGrid is bound. The handler also sets the selectedIndex of the DG to the just edited row. This all works fine if I end the editing session using Tab or Enter or Escape, but if I click in the next row, something confuses the rowIndex of the click, and the next row's cell is put in edit mode instead of the one clicked. So far I have been unable to repro this in a test app (quit because of time issues), but it occurs both places that I use this methodology. I also have found that there is some kind of event tangle. When my change handler is invoked and re-assigns the DG dataProvider, we are still within the itemEditEnd handler, but assigning the DP causes us to hit the itemEditend handler AGAIN, recursively. I am about ready to just set a flag and conditionally skip the problem code, but any other ideas will be appreciated. I'll post some snippets below. Tracy Tracing: onEditEnd() //value updated, click in 2nd row(index 1),itemEditEnd handler called ..onEditEnd rowIndex=0 // changeProjItemData() //updates the data model onXmlProjItemsChange: //ChangeWatcher handler ..-- here we assign the dg dataProvider -- onEditEnd() //UNEXPECTED call to itemEditEnd handler ..onEditEnd rowIndex=0 selectItemByIndex( 0) onSelectItem //called by DG change event handler, 2nd row(index 1) clicked ..set _iSelectedIndex to row clicked=2 //WRONG index, clicked index 1 ..-- here , the 3rd row is set to editable, not the 2nd as clicked Snippets: /**This gets fired when the itemEditor is about to be destroyed. */ private function onEditEnd(event:DataGridEvent):void { trace(.ProjItem.onEditEnd()) var sPropertyName:String = event.dataField; //get the dataField var sValue:String = TextInput(event.currentTarget.itemEditorInstance).text; //and value trace(.onEditEnd rowIndex= + event.rowIndex ) if (_xmlProjItem[sPropertyName] != sValue) { //if value changed changeProjItemData(sPropertyName,sValue
[flexcoders] Re: itemRender Debug Warnings
I've got 29 lists, so I'm not sure I want 29 ArrayCollections with bindings :-) The code is far too extensive to post here, but the warning it not at compile, but in Debug mode at runtime. I get this for every field in the list that I bind to in the itemRenderer. So with my Object = {itemID: myID, index: myAC[myID].id, display: gridDisplay, toolTip: tipText}; If in the itemRenderer I bind to display and toolTip, I get 2 warnings for each item in the List dataProvider. I'm fairly sure that it has to do with how I take the RemoteObject restul data and assign it to the ArrayCollection. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Hmmm, if List.dataProvider.addItem() works, then the dataProvider must be an ArrayCollection. It still may be behind an Object though. Instead doing what you are, I'd declare a var as an ArrayCollection, do your loop and add your items. Bind that var to the List.dataProvider. Also, exactly what line is causing the warning? Post it. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 7:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: itemRender Debug Warnings To be more thorough in my response, I loop through the data in an ArrayCollection to create this Object that I then add to a List component. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , jmfillman jmfillman@ wrote: It's a standard List component. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: What is the dataProvider? What data type? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:47 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: itemRender Debug Warnings Thank you for the reply Tracy! So instead of adding the items to the list as an Object I should..? var objDG:Object = {itemID: myID, index: myAC[myID].id, display: gridDisplay, toolTip: tipText}; myList.dataProvider.addItem(objDG); --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Tracy Spratt tspratt@ wrote: Neither Array nor Object are bindable, they do not dispatch the necessary events. Wrap your Array in an ArrayCollection. One other cause of this warning is when you have a bindable object that you reference through a property typed as Object, as with selectedItem, currentItem, data, getRepeaterItem(), etc. In that case you can convert or cast the Object to the true data type to prevent the warnings. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of jmfillman Sent: Tuesday, May 06, 2008 6:14 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] itemRender Debug Warnings Since implementing some itemRenderers, I've been getting warnings, in Debug mode, that read like this: warning: unable to bind to property 'display' on class 'Object' (class is not an IEventDispatcher) From what I've been able to find on the www, is that this is related to setting RemoteObject results to an array, like this: myAC.source = event.result as Array; Question is, how to I do this correctly to prevent all those warnings?
[flexcoders] Re: Date and Time Math (DST change implications)
I've been playing with this for the past week or so, and the best option I have found is like this: var dateOffset:Number; if (newDate.selectedDate.getTimezoneOffset() == originalDate.getTimezoneOffset()) { dateOffset = ((newDate.selectedDate.getTime() - originalDate.getTime ()) / 8640); } else if((newDate.selectedDate.getTime() - originalDate.getTime()) 0) { dateOffset = ((newDate.selectedDate.getTime() - (originalDate.getTime() + 360)) / 8640); } else { dateOffset = (((dtApptDate.selectedDate.getTime() - 360) - originalDate.getTime()) / 8640); } I could also gone through the steps to find the day of year for both dates and simply subtracted, but this seemed easier. --- In flexcoders@yahoogroups.com, Ryan Matsikas [EMAIL PROTECTED] wrote: Convert both dates to the same timezone, I suggest UTC since its already there, then do the math. On Fri, Apr 25, 2008 at 5:03 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 22 Apr 2008, jmfillman wrote: I assume that I need to account for that 1 hour, the question is, how? Math.round() or similar is a bit of a blunt instrument, depending on what you want the result to be when the timezone offsets are (say) 12 hours. -- Tom Chiverton Helping to augmentatively syndicate 24/7 services on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Programmatic scrolling of a TileList?
It sounds like you are on the right path, however, initially the scrollToIndex() is 1, correct? Each button click should increment the scrollToIndex() by 1 (or -1 if moving left on the list), so instead of scrollToIndex() being 4 after the click, it should be 2. Next click, 3, etc Just be careful to account for the total number in the index so you don't get an error by trying to go to index position of negative 1 or, in this example, 5. --- In flexcoders@yahoogroups.com, djbrown_rotonews [EMAIL PROTECTED] wrote: any help out there? --- In flexcoders@yahoogroups.com, djbrown_rotonews djbrown_rotonews@ wrote: anyone? :) --- In flexcoders@yahoogroups.com, djbrown_rotonews djbrown_rotonews@ wrote: I've got a tile list component that I want to be able to scroll through horizontally without the visual presence of the scroll bars themselves. I've got a set of arrows that the user can click on to scroll through the items, but it's not quite working as desired. Basically, my itemRenderers are data grids, but I don't want the user to be able to view just half a grid etc.. There might be 5 grids under the covers, but I want only 3 full ones to be displayed at any given time. I'm using the button controls to increment through the selectedIndex of the TileList itself, and then calling the scrollToIndex() method using the index, but it behave as desired: Default view: Grids 1, 2 and 3 visible User click to navigate to the right, so I'd want Grids 2, 3 and 4 to be visible. The problem is that it's always displaying Grids 1, 2 and 3 up to point where the selectedIndex is now Grid 4, and all I get displayed in Grid 4 (I'd want Grids 2, 3, and 4) I'm hoping that made some sense. will I need to extend the TileList class and mess around with the visible property for each renderer as well?
[flexcoders] Date and Time Math (DST change implications)
I have two date variables. Variable myDate1 has the following date: Sun Mar 30 00:00:00 GMT-0700 2008 Variable myDate2 has the following date: Sun Feb 24 00:00:00 GMT-0800 2008 I need to subtract date 2 from date 1 to get a number of days between: ((myDate1.getTime() - myDate2.getTime()) / 8640); Usually, this give me a nice round number, like 35. However, in the example above, returns a number of 34.9583336.. I assume that I need to account for that 1 hour, the question is, how? It still needs to work regardless of whether or not the two dates cross a time change.
[flexcoders] Re: How can I clear an ArrayCollection or Datagrid
removeAll() should do exactly what you are looking for, but only if your dataGrid's dataprovider is bound to the arrayCollection. If your dataGrid is not bound to the arrayCollection, the dataGrid will not change as data in the arrayCollection changes (unless you have accounted for this programatically elsewhere). If you do not want to use binding, the easiest thing would be to add a collection_change eventListener on the arrayCollection so you can clear out or update the dataGrid as the arrayCollection data changes. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I have used AC API method removeAll() to clear an AC, and it properly updates the UI. Assigning an empty AC should do it as well, though. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Monday, April 07, 2008 12:30 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: How can I clear an ArrayCollection or Datagrid If the service returned an empty AC, I would verify that the DG has really been assigned that empty AC. Read back the dataProvider on the DG and see what its length is. You can also try to manually reset the DG to an empty AC and see if it refreshes that way. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jovialrandor Sent: Sunday, April 06, 2008 5:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How can I clear an ArrayCollection or Datagrid Alex, the HTTPService returns an empty arraycollection, but the datagrid still has the values from the last call. How do I in the code refresh the arraycollection, since the 'refresh ()' did not work? Thanks --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: I would think that your service should return an empty array collection, or return a failure. If it returns an empty array collection it should refresh. If it returns a failure, then you should set the arraycollection to an empty arraycollection on failure From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of jovialrandor Sent: Saturday, April 05, 2008 9:16 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] How can I clear an ArrayCollection or Datagrid I use a HTTPService to load data into an ArrayCollection which is used for a datagrid. For example I type in a parameter A to the HTTPService that returns data that gets loaded in to ArrayCollectin. However when I when resend the HTTPservice with parameter B that returns no data, the datagrid still displays the value of parameter A. I've tried: httpservice.send(); // To get new values arraycollection.refresh(). // To refresh the datagrid. But no luck. Thanks
[flexcoders] Re: how do you guys handle reporting?
I would love to see a report builder/formater added to FlexBuilder, much like what is available for ColdFusion. --- In flexcoders@yahoogroups.com, Pavel Cristian Gabriel [EMAIL PROTECTED] wrote: I use an iFrame window, so the report is inside a panel that is inside the main application. If you want more please visit http://www.themidnightcoders.com/blog/2006/12/mixing-html-and-flex- using-ifr ame.html. Cristy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Anderson Sent: Monday, April 07, 2008 12:48 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] how do you guys handle reporting? can i ask how you integrate that with your flex app? do u just send them to another window that loads the sql reporting services? thanks, d. On Sun, Apr 6, 2008 at 4:18 PM, Pavel Cristian Gabriel [EMAIL PROTECTED] wrote: I am using Microsoft SQL Server Reporting Services. It is integrated to Microsoft SQL Server (Database), the deployment of the reports is on the Web and they have Excel, Word, PDF, TIFF, or .XML format files for exporting these reports. I want to mention some other features. You can subscribe to a report based on a schedule and you can receive it on your email (for example). Another interesting feature (for me) is the ability to jump from a report to another report (hyperlink). Cristy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Anderson Sent: Sunday, April 06, 2008 9:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] how do you guys handle reporting? hi, i have a crm application that I am going to start adding reports to. I haven't done much with reports in flex, and i'm looking for a nice reporting solution. I know all about FlexReport but it seems very new in development and i need something more robust like the report builder included in ColdFusion or Crystal Reports. so how do you guys handle reports in your applications? thanks, d.
[flexcoders] Re: When can I access the Stage Object?
Mike, Try this: systemManager.stage.addEventListener( Event.RESIZE, onStage_Resize ); You should be able to access this earlier, with the initialize event as well, if necessary. Jason --- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, In my main mx:Application I am attempting to add an Event Listener to the Stage Object, after the CreationComplete Event is triggered. Upon application startup, I get that wonderful error dialog stating: Cannot access a property or method of a null object reference. I want to play around with some validate() stuff, in order to speed up my Flex Resizing issues. This is what I have for my code: private function onApplication_CreationComplete( event:FlexEvent ):void { stage.addEventListener( Event.RESIZE, onStage_Resize ); } private function onStage_Resize( event:Event ):void { this.validateNow(); } So the question is, is the Stage Object not yet available? Do I need to place this Event Listener on a Child Object contained within my Application? Any thoughts on this would be greatly appreciated :) Mike
[flexcoders] ItemRenderer Button fillColor
I am trying to take the value field from the array, and use it in an itemRender to set the color of a button in the itemRender. What is the correct syntax for this? ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ private var categories:Array = new Array( {name: Sam, value: 0x009DFF}, {name: Ryan, value: 0xFF}, {name: Julie, value: 0x008000}, {name: Chris, value: 0x00FF00}, ]] /mx:Script mx:List width=594 height=250 dataProvider={categories} mx:itemRenderer mx:Component mx:Button label={data.name} fillColors={data.value}/ /mx:Component /mx:itemRenderer /mx:List /mx:Application
[flexcoders] Re: Calendar / Scheduling Component
Tom, I am currently working on an appointment calendar component. I'm nearly finished. You can try it out at http://www.imbizzi.com JF