[flexcoders] Re: Flex charting question
Well I dont really want another line to appear so much as a gradient area which shows an approved range. So for example, if the chart showed the axis between june 14th of 07, and a particular weight range, like 200-230 lbs. I would want the space between 200 and 230 to be colored a particular color, then a point to appear between there which actually represents the users data, to show them that on june 14th, they were within the acceptable weight range. Doctors have charts like this for children. As your child gets thier hieght and weight measured on the chart there is a colored area, which shows were most kids are within the average, to basically show you if you kid is too fat for his age or whatnot. JS --- In flexcoders@yahoogroups.com, simonjpalmer [EMAIL PROTECTED] wrote: can't you just add another data series to the chart? --- In flexcoders@yahoogroups.com, cardinalflexjeremy sandersjs@ wrote: I have a question for the group in regards to flex charting. I need to develop a chart like a line chart. The hard part is i need to basically show the data of a particular user, but at the same time, show a range of acceptable data values. Here is an example. The chart should show weight loss over time, so one side of the chart will show weight, while the other will show time. At different intervals where data is available a dot appears showing weight loss over time. But I need to display on either side of the dots in the chart, the median values, like what the acceptable range is for weight loss over time, to show if a person is losing too much weight too fast, I need the chart to display that. Its something similar to showing the height and weight of a child. Basically graphically in the graph, I need to show like an acceptable range, and show where in the process the user is. Are they in range or out of range? Any thoughts? Jeremy Sanders
[flexcoders] Flex charting question
I have a question for the group in regards to flex charting. I need to develop a chart like a line chart. The hard part is i need to basically show the data of a particular user, but at the same time, show a range of acceptable data values. Here is an example. The chart should show weight loss over time, so one side of the chart will show weight, while the other will show time. At different intervals where data is available a dot appears showing weight loss over time. But I need to display on either side of the dots in the chart, the median values, like what the acceptable range is for weight loss over time, to show if a person is losing too much weight too fast, I need the chart to display that. Its something similar to showing the height and weight of a child. Basically graphically in the graph, I need to show like an acceptable range, and show where in the process the user is. Are they in range or out of range? Any thoughts? Jeremy Sanders
[flexcoders] Flex FDS security
I am working on an enterprise public facing application and we are going to be using flex with FDS. Anyone know of any good documentation on securing flex from the frontend, and anything having to do with Flex FDS security protocol, or flex security methodologies or anything of that sort? Basically in short, the best practice to make flex and FDS communication secure. Jeremy
[flexcoders] Making a tree branch unclickable
I have a simple tree component, tied to a XML list. I want to make the branches unclickable, but not the leafs. When the user clicks the branch I dont want it to do anything or populate the details panel at the side, only when they click the leaf. Anyway to do this easily? JS
[flexcoders] Drawing a box over top of an image
OK here is the deal. I need to take a jpg image, and display it to the user. I need the entire image displayed. From there I need to give the user the ability to click and hold with thier mouse, and draw a box over the top of the image. I can kinda get it to work. I am using the image as the background of a HBox, but it does not display the entire image, it clips the top and bottom. Anyone done anything similar to this? The end result is that I am trying to catpure coordinates on the image to pass to a java backend to display a digital signature section on the image. Any help would be greatly appreciated.
[flexcoders] Re: Drawing a box over top of an image
Using an image tag, I can get it to work, but when I draw the box it shows up 'behind' the image, so that doesnt do what I want. When using an HBox and setting the background image param, the pic is getting clipped. When I set the backgroundScale attribute, to 100% it squishes the image to fit the HBox, which wont expand to encapsulate the entire image. Help! --- In flexcoders@yahoogroups.com, cardinalflexjeremy [EMAIL PROTECTED] wrote: OK here is the deal. I need to take a jpg image, and display it to the user. I need the entire image displayed. From there I need to give the user the ability to click and hold with thier mouse, and draw a box over the top of the image. I can kinda get it to work. I am using the image as the background of a HBox, but it does not display the entire image, it clips the top and bottom. Anyone done anything similar to this? The end result is that I am trying to catpure coordinates on the image to pass to a java backend to display a digital signature section on the image. Any help would be greatly appreciated.
[flexcoders] Re: Drawing a box over top of an image
Sorry its been a long day. Is there any simple explanation of how to bring the graphics layer to the front? Here is my code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=100% height=100% backgroundColor=#FF mx:Script ![CDATA[ import flash.events.MouseEvent; import mx.controls.Alert; import mx.utils.GraphicsUtil; private var _xStart:Number; private var _yStart:Number; public function drawBox(event:MouseEvent):void{ _xStart = event.localX; _yStart = event.localY; addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); addEventListener(MouseEvent.MOUSE_UP, endDraw); } public function endDraw(event:MouseEvent):void{ removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); } public function onMouseMove(event:MouseEvent):void{ drawRectangle(event); } public function drawRectangle(event:MouseEvent):void{ var width:Number = event.localX - _xStart; var height:Number = event.localY - _yStart; var g:Graphics = myImage.graphics; g.clear(); g.lineStyle(2, 0xFF, 1); g.beginFill(0x00, 0); myImage.setFocus(); GraphicsUtil.drawRoundRectComplex(g, _xStart, _yStart, width, height, 0, 0, 0, 0); g.endFill(); } ]] /mx:Script mx:HBox width=100% height=100% mouseDown=drawBox(event) id=myImage mx:Image x=0 y=0 source=@Embed('../resources/spring-reference6.jpeg') / /mx:HBox /mx:Application --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The graphics layer is below all children, so you need to add other visuals as children over the image. Below is the code I prototyped for an Image with a close button and resize handle. public class CloseResizeImage extends Image { public function CloseResizeImage() { super(); } private var closeButton:Button; private var resizer:Image; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=Button_Up)] private var upSkin:Class; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=Button_Over)] private var overSkin:Class; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=Button_Down)] private var downSkin:Class; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=WindowResizer)] private var resizerSkin:Class; override public function load(url:Object = null):void { super.load(url); if (!closeButton) { closeButton = new Button; closeButton.setStyle(upSkin, upSkin); closeButton.setStyle(overSkin, overSkin); closeButton.setStyle(downSkin, downSkin); addChildAt(closeButton, 1); closeButton.addEventListener(click, clickHandler); resizer = new Image; resizer.source = resizerSkin; addChildAt(resizer, 2); resizer.addEventListener(mouseDown, mouseDownHandler); } setChildIndex(closeButton, 1); setChildIndex(resizer, 2); } override protected function updateDisplayList(uw:Number, uh:Number):void { super.updateDisplayList(uw, uh); closeButton.move(uw - closeButton.getExplicitOrMeasuredWidth(), 0); closeButton.setActualSize(closeButton.getExplicitOrMeasuredWidth(), closeButton.getExplicitOrMeasuredHeight()); var rw:Number = resizer.getExplicitOrMeasuredWidth(); var rh:Number = resizer.getExplicitOrMeasuredHeight(); resizer.move(uw - rw, uh - rh); resizer.setActualSize(rw, rh); // graphic is porous so make a hit area for it. resizer.graphics.clear(); resizer.graphics.beginFill(0, 0); resizer.graphics.moveTo(rw, 0); resizer.graphics.lineTo(0, rh); resizer.graphics.lineTo(rw, rh); resizer.graphics.lineTo(rw, 0); resizer.graphics.endFill(); } private function clickHandler(event:Event):void { visible = false; } private function mouseDownHandler(event:Event):void { stage.addEventListener(mouseUp, mouseUpHandler); stage.addEventListener(mouseLeave, mouseUpHandler); stage.addEventListener(mouseMove, mouseMoveHandler); } private function mouseUpHandler(event:Event):void { stage.removeEventListener(mouseUp, mouseUpHandler); stage.removeEventListener(mouseLeave, mouseUpHandler); stage.removeEventListener(mouseMove, mouseMoveHandler); } private function mouseMoveHandler(event:MouseEvent):void { var stagePt:Point = new Point(event.stageX, event.stageY); var localPt:Point = parent.globalToLocal(stagePt); if (localPt.x = x) explicitWidth = localPt.x - x; if (localPt.y = y) explicitHeight = localPt.y - y; } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cardinalflexjeremy Sent: Monday, April 02, 2007 10:54 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Drawing a box over top of an image Using
[flexcoders] Re: Drawing a box over top of an image
re-reading this it sounds more negative than I meant it to. Simply put, I dont see in the code, where you are adding a child to the image is all. If there is some code I need to implement below, so as to not have to re-work the image component I would be greatly appreciative for any help or advice. JS --- In flexcoders@yahoogroups.com, cardinalflexjeremy [EMAIL PROTECTED] wrote: Sorry its been a long day. Is there any simple explanation of how to bring the graphics layer to the front? Here is my code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=100% height=100% backgroundColor=#FF mx:Script ![CDATA[ import flash.events.MouseEvent; import mx.controls.Alert; import mx.utils.GraphicsUtil; private var _xStart:Number; private var _yStart:Number; public function drawBox(event:MouseEvent):void{ _xStart = event.localX; _yStart = event.localY; addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); addEventListener(MouseEvent.MOUSE_UP, endDraw); } public function endDraw(event:MouseEvent):void{ removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); } public function onMouseMove(event:MouseEvent):void{ drawRectangle(event); } public function drawRectangle(event:MouseEvent):void{ var width:Number = event.localX - _xStart; var height:Number = event.localY - _yStart; var g:Graphics = myImage.graphics; g.clear(); g.lineStyle(2, 0xFF, 1); g.beginFill(0x00, 0); myImage.setFocus(); GraphicsUtil.drawRoundRectComplex(g, _xStart, _yStart, width, height, 0, 0, 0, 0); g.endFill(); } ]] /mx:Script mx:HBox width=100% height=100% mouseDown=drawBox(event) id=myImage mx:Image x=0 y=0 source=@Embed('../resources/spring-reference6.jpeg') / /mx:HBox /mx:Application --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: The graphics layer is below all children, so you need to add other visuals as children over the image. Below is the code I prototyped for an Image with a close button and resize handle. public class CloseResizeImage extends Image { public function CloseResizeImage() { super(); } private var closeButton:Button; private var resizer:Image; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=Button_Up)] private var upSkin:Class; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=Button_Over)] private var overSkin:Class; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=Button_Down)] private var downSkin:Class; [Embed(source=ATOC_F8_v3r9_8.swf,symbol=WindowResizer)] private var resizerSkin:Class; override public function load(url:Object = null):void { super.load(url); if (!closeButton) { closeButton = new Button; closeButton.setStyle(upSkin, upSkin); closeButton.setStyle(overSkin, overSkin); closeButton.setStyle(downSkin, downSkin); addChildAt(closeButton, 1); closeButton.addEventListener(click, clickHandler); resizer = new Image; resizer.source = resizerSkin; addChildAt(resizer, 2); resizer.addEventListener(mouseDown, mouseDownHandler); } setChildIndex(closeButton, 1); setChildIndex(resizer, 2); } override protected function updateDisplayList(uw:Number, uh:Number):void { super.updateDisplayList(uw, uh); closeButton.move(uw - closeButton.getExplicitOrMeasuredWidth(), 0); closeButton.setActualSize(closeButton.getExplicitOrMeasuredWidth(), closeButton.getExplicitOrMeasuredHeight()); var rw:Number = resizer.getExplicitOrMeasuredWidth(); var rh:Number = resizer.getExplicitOrMeasuredHeight(); resizer.move(uw - rw, uh - rh); resizer.setActualSize(rw, rh); // graphic is porous so make a hit area for it. resizer.graphics.clear(); resizer.graphics.beginFill(0, 0); resizer.graphics.moveTo(rw, 0); resizer.graphics.lineTo(0, rh); resizer.graphics.lineTo(rw, rh); resizer.graphics.lineTo(rw, 0); resizer.graphics.endFill(); } private function clickHandler(event:Event):void { visible = false; } private function mouseDownHandler(event:Event):void { stage.addEventListener(mouseUp, mouseUpHandler); stage.addEventListener(mouseLeave, mouseUpHandler); stage.addEventListener(mouseMove, mouseMoveHandler); } private function mouseUpHandler(event:Event):void { stage.removeEventListener(mouseUp, mouseUpHandler); stage.removeEventListener(mouseLeave, mouseUpHandler); stage.removeEventListener(mouseMove, mouseMoveHandler); } private function mouseMoveHandler(event:MouseEvent):void { var stagePt:Point = new Point(event.stageX
[flexcoders] Re: Center alignment problem
The popup scenario is not what the client is looking for. The second option you gave me, does not work either. Instead it puts the box in the upper left of the screen, and all the items within the box appear one on top of another. So the items are in the center of the box, with the username label appearing first, then below it the password label, then below that the username text input box, so on and so forth. I could really use some sugestions on how to get this to work. JS --- In flexcoders@yahoogroups.com, Shaun [EMAIL PROTECTED] wrote: a couple of options: 1) change your login control to a popup titlewindow instead and use popupmanager to center it to the viewstack 2) put your login control in a mx:Box control that takes up the full size of the viewstack and has verticalAlign set to middle and horizontalAlign set to center. Shaun --- In flexcoders@yahoogroups.com, cardinalflexjeremy sandersjs@ wrote: I have a viewstack, that contains two sub components. One (the first) is simply a small login panel. (its actually just a canvas with text fields and a header etc inside it). The second is what is shown once the user is logged in; its also a large canvas, with a function app inside that component. So my code looks like this: mx:ViewStack width=800 height=600 maxHeight=600 maxWidth=800 selectedChild={getView(false)} id=myViewStack view:LoggedInView id=LoggedInView / view:loginPanel id=LoginView / /mx:ViewStack So I want to have the loginPanel displayed in the center of the available real estate, regardless of screen real estate, (some viewers might be 1024x 768 and some might be 800 x 600) is there anyway to automatically center the loginPanel component in the parent view stack? Thanks JS
[flexcoders] Re: Center alignment problem
OK I figured it out. Basically verticalalign and horizontal align are for the children of the class not the class itself, which was what was throwing me off. So I created a custom component based on the box, as the other poster said, THEN I placed inside the box element a panel, which contained my login labels, and input text boxes etc. In the viewstack when I instantiated my box element, I set it up with vertical and horizontal alignments so that the PANEL inside it showed up in the middle. Also the boxs' width and hieght were both 100% of the viewstack. For future reference. Thanks to all who helped. --- In flexcoders@yahoogroups.com, Shaun [EMAIL PROTECTED] wrote: a couple of options: 1) change your login control to a popup titlewindow instead and use popupmanager to center it to the viewstack 2) put your login control in a mx:Box control that takes up the full size of the viewstack and has verticalAlign set to middle and horizontalAlign set to center. Shaun --- In flexcoders@yahoogroups.com, cardinalflexjeremy sandersjs@ wrote: I have a viewstack, that contains two sub components. One (the first) is simply a small login panel. (its actually just a canvas with text fields and a header etc inside it). The second is what is shown once the user is logged in; its also a large canvas, with a function app inside that component. So my code looks like this: mx:ViewStack width=800 height=600 maxHeight=600 maxWidth=800 selectedChild={getView(false)} id=myViewStack view:LoggedInView id=LoggedInView / view:loginPanel id=LoginView / /mx:ViewStack So I want to have the loginPanel displayed in the center of the available real estate, regardless of screen real estate, (some viewers might be 1024x 768 and some might be 800 x 600) is there anyway to automatically center the loginPanel component in the parent view stack? Thanks JS
[flexcoders] Center alignment problem
I have a viewstack, that contains two sub components. One (the first) is simply a small login panel. (its actually just a canvas with text fields and a header etc inside it). The second is what is shown once the user is logged in; its also a large canvas, with a function app inside that component. So my code looks like this: mx:ViewStack width=800 height=600 maxHeight=600 maxWidth=800 selectedChild={getView(false)} id=myViewStack view:LoggedInView id=LoggedInView / view:loginPanel id=LoginView / /mx:ViewStack So I want to have the loginPanel displayed in the center of the available real estate, regardless of screen real estate, (some viewers might be 1024x 768 and some might be 800 x 600) is there anyway to automatically center the loginPanel component in the parent view stack? Thanks JS
[flexcoders] Flex coldfusion simple question
Simple question here for the group. If I want to make a flex app to tie to a Database, and I want to use Coldfusion components to access the Database stuff, and connect Flex and coldfusion, do I need FDS to use the coldfusion adapter pieces? Please let me know if a company would require FDS in order to use coldfusion with flex? Thanks.
[flexcoders] Re: Flex coldfusion simple question
Are there any code examples or tutorials on this? That is, any samples using coldfusion (not webservices or httpRequest) to access CFCs? thanks. --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Thursday 22 Mar 2007, cardinalflexjeremy wrote: If I want to make a flex app to tie to a Database, and I want to use Coldfusion components to access the Database stuff, and connect Flex and coldfusion, do I need FDS to use the coldfusion adapter pieces? No. You can use Flex's RemoteObject straight to a CFC, no FDS (now called LCDS btw) required. Please let me know if a company would require FDS in order to use coldfusion with flex? Again with the no :-) -- Tom Chiverton Helping to continually morph slick appliances 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 St James's Court Brown Street Manchester M2 2JF. 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 Law Society. 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 8008. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Event calling in Cairngorm 2.1 - Newbie question.
There actually is a problem in the Cairngorm store code. I found it when trying to dispatch an event using it. There are two sections that dispatch events, one works and one does not. The section with the graphical tile list dispatches a cairngorm event, but not using the CairngormEventDispatcher to update the details. The textual list uses a different method, since I had a grid object updating the details panel, I used that code, and it does not fire. The rule of thumb is, if you want to dispatch and event that is not registered on your controller, you do not use the CairgormEventDispatcher, but the standard EventDispatcher, regardless of whether or not your event is a cairngorm event. If you are using the code that resides in the textual product list to dispatch an event to update the details it will not work, the code is wrong. Unless they changed it recently. If you download it, compile it, and run it, switch to the textual view, it will not update the details panel. However the visual graphical tile list will work. Because they use different event dispatching. Hope this helps. This was a problem for me too. This may not be what your doing, but at least make sure you did not copy the code from the textual product list to dispatch the event or it wont work properly. Jeremy Sanders Cardinal Solutions Group Flex Application Developer [EMAIL PROTECTED] --- In flexcoders@yahoogroups.com, Stembert Olivier \(BIL\) [EMAIL PROTECTED] wrote: What's the description of the error? Are you sure the controller has been instantiated? Olivier From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Wednesday, January 10, 2007 12:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Event calling in Cairngorm 2.1 - Newbie question. I am trying to follow the 2.1 store as a model to understand the cairngorm structure and I am getting a constant error in trying to dispatch an event. I copied the example code almost exactly, but i get seen to get the even to fire. I don't know if the problem is in my FrontController or my event. Any help you can offer is much appreciated. Thank, Kevin --- I have this in my main.mxml file private function loadGroupList() : void { CairngormEventDispatcher.getInstance().dispatchEvent( new CairngormEvent( GetGroupListEvent.EVENT_GET_GROUP_LIST ) ); } and then in my event file: import flash.events.Event; import com.adobe.cairngorm.control.CairngormEvent; public class GetGroupListEvent extends CairngormEvent { public static var EVENT_GET_GROUP_LIST : String = getGroupList; //public var position : int; /** * Constructor. */ public function GetGroupListEvent() { super( EVENT_GET_GROUP_LIST ); } /** * Override the inherited clone() method, but don't return any state. */ override public function clone() : Event { return new GetGroupListEvent(); } } and my controller: import com.adobe.cairngorm.control.FrontController; //import the command folder import com.onefoot.dbocl.command.* //import each event import com.onefoot.dbocl.event.GetGroupListEvent; /** * @version $Revision: $ */ public class DboclController extends FrontController { public function DboclController() { initialiseCommands(); } public function initialiseCommands() : void { addCommand( GetGroupListEvent.EVENT_GET_GROUP_LIST, GetGroupListCommand ); } } - An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. - - An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. -
[flexcoders] Re: Event calling in Cairngorm 2.1 - Newbie question.
Hey Kevin. Well my problem was different than yours but I will answer your question as best I can. What I would check are: Make sure your controller is being instantiated on your Main.mxml page. Like this: !-- the FrontController, containing Commands specific to this appliation -- control:MyController id=MyController / **NOTE** make sure control: is mapped to the directory you have your FrontController class in. If you have the reference to the controller, being instantiated on the Main.mxml, then move on to the controller itself. Be sure you have a constructor, and an initialize commands method, that has registered events, with commands. Using the CairngormEventDispatcher, will fire your events, but only the FrontController you instantiate will hear them. At the same time if you are dispatching a CairngormEvent using the standard EventDispatcher, it will NOT send the event to the FrontController. This is useful for firing events in a standard way, for the grid details panel for example, but not when you dont actually register the Event to a command. The constructor: public function MyController() { initialiseCommands(); } The initilseCommands() method: public function initialiseCommands() : void { addCommand( Event1.EVENT_LOGIN, LoginCommand ); addCommand( Event2.EVENT_GET_AUTHENTICATION, GetAuthenticationCommand ); } In your commands execute method write a simple popup to test: execute(){ Alert.show(Testing); } Just to see whats happening. As for your question about the static variables. I dont know that it makes much difference. I prefer to put mine on the events, simply because I dont like having a lot of statics attached to my controller, but it might make sense should you get alot to have them all in one place. I also do things perhaps a little differently, by creating general events, such as an AuthenticateEvent, with three Statics, like LOGIN, LOGOUT, and GETAUTHENTICATED. This way I have one event that handles multiple functions, but it could get complicated managing it, should your events require lots of member variables for data payload. Hope this helps. --- In flexcoders@yahoogroups.com, Kevin [EMAIL PROTECTED] wrote: I am actually looking at the event called in the Main.mxml file --- private function onCreationComplete() : void { CairngormEventDispatcher.getInstance().dispatchEvent( new CairngormEvent( GetProductsEvent.EVENT_GET_PRODUCTS ) ); } --- I will look at my code again today and see if I can find the error. I am getting no error message, the event just doesn't fire. I have also noticed in the store code, that they store the static event variable --- public static var EVENT_GET_PRODUCTS : String = getProducts; --- in the Event class, while most other Cairngorm examples store this in the Controller. Is this just personal preference or is there a more significant reason for this? - Kevin On Jan 10, 2007, at 8:30 AM, cardinalflexjeremy wrote: There actually is a problem in the Cairngorm store code. I found it when trying to dispatch an event using it. There are two sections that dispatch events, one works and one does not. The section with the graphical tile list dispatches a cairngorm event, but not using the CairngormEventDispatcher to update the details. The textual list uses a different method, since I had a grid object updating the details panel, I used that code, and it does not fire. The rule of thumb is, if you want to dispatch and event that is not registered on your controller, you do not use the CairgormEventDispatcher, but the standard EventDispatcher, regardless of whether or not your event is a cairngorm event. If you are using the code that resides in the textual product list to dispatch an event to update the details it will not work, the code is wrong. Unless they changed it recently. If you download it, compile it, and run it, switch to the textual view, it will not update the details panel. However the visual graphical tile list will work. Because they use different event dispatching. Hope this helps. This was a problem for me too. This may not be what your doing, but at least make sure you did not copy the code from the textual product list to dispatch the event or it wont work properly. Jeremy Sanders Cardinal Solutions Group Flex Application Developer [EMAIL PROTECTED] --- In flexcoders@yahoogroups.com, Stembert Olivier \(BIL\) olivier.stembert@ wrote: What's the description of the error? Are you sure the controller has been instantiated? Olivier From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Wednesday, January 10, 2007 12:21 AM
[flexcoders] Re: Date Fields and Data Binding.
I did and that worked. I knew the problem could not be as hard as it was turning out to be. The problem was I was being asked to help with another co workers problem. He had in one place the value from the model bound to the text attribute, but the selectedDate was bound back to the model using the binding tag. Since I only saw the selectedDate, I figured since he was having a problem, and was using that attribute, I focus on the other attributes for the field. That was my problem. Thanks for your help. Jeremy Sanders. --- In flexcoders@yahoogroups.com, Philippe [EMAIL PROTECTED] wrote: Hi, Did you try the selectedDate attribute of your DateField ? selectedDate property selectedDate:Date [read-write] Date as selected in the DateChooser control. Accepts a Date object as a parameter. Selecting the currently selected date in the control deselects it, sets the selectedDate property to null, and then dispatches the change event. The default value is null. This property can be used as the source for data binding. Implementation public function get selectedDate():Date public function set selectedDate(value:Date):void Phil -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jsscardinal Sent: mercredi 6 décembre 2006 20:27 To: flexcoders@yahoogroups.com Subject: [flexcoders] Date Fields and Data Binding. I am attempting to do something I thought was pretty simple. Using the cairngorm model, basically I have a data instance object attached to the model, and it has a Data Object attached to it. So think of it this way. I am running an application that tracks a list of canidates. So there is a CanidateVO actionscript object, and it has a member variable attached to it called interview date, and its of type Date. I am running a java backend retrieving these using spring and hybernate, and the conversion works fine. The problem I am having is with data binding in a grid and details panel. The grid has an array collection which is attached to the model, and that array contains a list of all the canidates, some that have dates and some that dont. All have member variables, but since all instances have not interviewed they may not have a value in the date field, thus those member vars are null. So the problem is that when I have a particular grid object selected, I see the details of that canidate in the details panel, which is just a panel that contains text fields and a dateField component. Well all the other bindings are working fine, but not the dateField binding. I have set the dateFields text bound to the attribute of the object, and that does not work, and I have set the dataProvider and that does not work, and I have even set a data attribute on the dateField and that does not work. Whats happening is, when I am looking at a particular canidate without an interview date, and I select the dateField, then put a date in it and DONT save the record but go to a different instance on the grid, all the fields are updated except the dateField. The dateField text remains there regardless of the fact that the selectedItem has changed, and the new selectedItem has no date in it. Conversly if I select a canidate who does have a date, the date is displayed, but once I go to one without a date, the date stays in the field. Why is data binding not working for dates? Please help. Jeremy.