Re: [flexcoders] Change the caret in TextArea
Thanks. I did come across this in my searching. This is also a brute force approach which I was hoping to avoid. Looks like I will have to do this anyway. Thanks a lot for your attention. -Raj valdhor-3 wrote: I do not believe you can inside Flex. If someone else knows differently, please chime in. You should be able to create a custom component with a timer and keyboard event listeners to simulate what you want. This blog post might be a good starting point: http://joshblog.net/2008/01/17/source-code-for-custom-textfields-with-cool-effects/ --- In flexcoders@yahoogroups.com, rituraj_tiwari rituraj.tiw...@... wrote: Valdhor, Thanks for taking the time to respond. I am not looking to change the mouse pointer cursor. I need to change the blinking caret that appears in text input and text area when they are editable. -Raj valdhor-3 wrote: These links should help... http://www.switchonthecode.com/tutorials/flex-custom-cursor-tutorial http://blog.flexexamples.com/2007/09/10/changing-the-cursor-in-a-flex-application-using-the-cursormanager-class/ http://www.adobe.com/livedocs/flex/3/langref/mx/managers/CursorManager.html#setCursor%28%29 --- In flexcoders@yahoogroups.com, Shabir Gilkar shabirgilkar@ wrote: Nice question friend, even i do wanna to know the answer On 11/23/09, rituraj_tiwari rituraj.tiwari@ wrote: Folks, I need to implement and editable text area where the cursor (caret) is different from the default vertical flashing caret. Is the caret a skinnable property of TextArea? In case the flashing vertical line is deeply entrenched, I would like to be able to overlay my own floating caret on top of it to obscure it. Is there an easy way to get the X-Y coordinates of the caret so that I can move() my custom cursor graphic to that location? Thanks for your help. -Raj -- View this message in context: http://old.nabble.com/Change-the-caret-in-TextArea-tp26474743p26474743.html Sent from the FlexCoders mailing list archive at Nabble.com. -- With Regards Shabir Ahmad Gilkar Srinagar Kashmir JK Voice: +91 9419942501 email: shabirgilkar@ Skype: shabirgilkar -- View this message in context: http://old.nabble.com/Change-the-caret-in-TextArea-tp26474743p26484608.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/Change-the-caret-in-TextArea-tp26474743p26499965.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] AIR - Ascynchronous file deletion - fixed order ?
So nobody knows this ?
RE: [flexcoders] Re: the most popular way to be connected with sql server REFdn0085136210
Yes it looks great. But developing in in php (only php), there is no need to purchase a kind of server like this; where, it is not so cheap. I think that Adobe should have developed libraries regarding sql server, as php have done. It seems strange where too strong engine (I mean the adobe flash in general) has no the ability to be connected with sql servers. Of course I think that Weborb-for-php is one of the best architect approach, but its is not for low budget projects. Guys. share your thoughts. dennis
Re: [flexcoders] AIR - Ascynchronous file deletion - fixed order ?
You could hold a list (in this case with 2 filenames) that you delete from one by one... just pop an element and refire until the list is empty.. That would also facilitate a progess bar using the original / current length of the array. Best regards and have a wonderful day! Allan Pichler Brewmaster - ColdFusion/Flex/Ajax/UI Email: dreamc...@gmail.com Skype: apichler Yahoo: allan_pichler
[flexcoders] Re: the most popular way to be connected with sql server REFdn0085136210
There is a community edition of WebORB for PHP that is free. Also, Adobe has ties with Zend and you can use Zend_AMF (Part of the Zend Framework) for free. I think free is cheap enough for everyone ;-} Also, if you want to connect directly to a MySQL database you can look into a component like ASSQL (http://code.google.com/p/assql/) --- In flexcoders@yahoogroups.com, dennis den...@... wrote: Yes it looks great. But developing in in php (only php), there is no need to purchase a kind of server like this; where, it is not so cheap. I think that Adobe should have developed libraries regarding sql server, as php have done. It seems strange where too strong engine (I mean the adobe flash in general) has no the ability to be connected with sql servers. Of course I think that Weborb-for-php is one of the best architect approach, but its is not for low budget projects. Guys. share your thoughts. dennis
[flexcoders] Flex Builder 3 for Linux updated
An updated build for Flex Builder 3 for Linux has just been posted to Labs. This removes the timeout at the end of this month, but doesn't do a lot else. News from Andrew Shorten (new Senior Product Manager for Flash Builder) at http://www.ashorten.com/2009/11/25/updated-build-of-flex-builder-for-linux-available/ : If you have any comments or suggestions on Flex Builder for Linux then please drop me an email and I'll make sure we consider them as we continue to work on our plans for Linux support. The article quotes http://www.ashorten.com/contact/ as the way to do that. Might I suggest everyone drops Andrew a nice polite email please ? -- Helping to interactively promote web-readiness as part of the IT team of the year, '09 and '08 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 together with a list of those non members who are referred to as partners. We use the word “partner” to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. 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] Questions I always wanted to know the answers to - AsyncTokens
What is AsyncToken and why is it preferred over just calling the Remote Object's method and adding listeners to the method for the result and fault? This class provides a place to set additional or token-level data for asynchronous RPC operations. It also allows an IResponder to be attached for an individual call. What is an example of why you would need to attach the IReponder (addResponser) to a particular method call? Again, I see on another site this In you application you have multiple service calls happening at the same time and you need to know which data coming back belongs to which call.. Calling the same method/service (getPeople) multiple times in the same instance or just calling multiple methods (getPeople, getPlaces, getThings) at the same time? I never had a problem with Flex mixing up the results of multiple methods being called before as a view loads up.. Thanks for any info you can provide.
[flexcoders] Re: E4x finding virtual leaf nodes
May be you could do as the following: var match :XMLList = xml..*.(descendants('activity').length() == 0 name() != null name() == 'activity'); Panhathai.
[flexcoders] Channel.Connect.Failed error NetConnection.Call.Failed: HTTP Status 404
Hi - I found that this error occurs frequently when moving a Flex project from one machine to another. In my situation, I am exporting a release build so another developer can run it on their machine; they don't have Flex, only the flash player to run it. They are receiving this error and the source is a RemoteObject call that points to a service on their machine. So, do I check the web.xml file for their machine? Or the services-config.xml on their machine? I just don't know where to start. Any tips are, of course, very much appreciated. Happy Thanksgiving. Thank you.
[flexcoders] cairngorm store example - newbie binding question
Greetings Flex pros: In the modified cairngorm store (if you're familiar), file ProductsAndCheckoutControlBar.mxml, there's: mx:Image source={ getProductThumbnailsButton( model.workflowState ) } That function (getProductThumbnailsButton) is not marked as 'bindable' so how does the binding happen? The var model is the only thing marked as bindable in the file. This is the function: public function getProductThumbnailsButton( enforceBining : Number ) : Class { var model : ShopModelLocator = ShopModelLocator.getInstance(); var result : Class = model.assets.thumbOff; if ( model.workflowState == ShopModelLocator.VIEWING_PRODUCTS_IN_THUMBNAILS ) { result = model.assets.thumbOn; } return result; }
[flexcoders] How to tell if a Modal Alert is currently displayed
Hi All, Is there a way to detect if a modal Alert is being displayed if you don't have reference to the Alert instance? I have a bug with a custom popup that is triggered with roll over/out event on an image, basically set a timer check back in couple hundred millis if the mouse is still over(hitTestPoint) and if so display the custom popup. However, at times the application displays an alert and I dont want show the popup if a Modal alert is currently displayed. Currently, there is many areas that are responsible for displaying the Alerts and I am trying to identify a quick and easy way to determine if an Alert is being displayed. When a modal Alert is displayed, does the focus change? Is there some property on my main component(module) that would tell me that it is not the top layer anymore? Any help much appreciated, Greg
[flexcoders] Re: List in second tab of TabNavigator has GIANT itemRenderer
--- In flexcoders@yahoogroups.com, Chris zomgfore...@... wrote: You can bind the width of the text field to the dimensions of its parent: mx:Canvas id=mainContainer width=100% height=100% styleName=debug1 mx:Text width={mainContainer.width} text=here is a very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long piece of text. / /mx:Canvas This way you don't have to use a 'hard' width. Kind of a hack, I know. Thanks for the suggestion, but this becomes problematic inside a Repeater, as you have to then give an ID to the parent and to other children in the container and then use really long expressions based on repeater.currentIndex. Plus, I think that the problem is really that at the time that measure() was called, all of the flexible components confused everything, and I'm not sure that binding to a variable-width component would have helpwed. Thanks :)
[flexcoders] Re: Questions I always wanted to know the answers to - AsyncTokens
Using an AsyncToken allows you to have only one event listener and one function to handle all responses from a remote procedure call. You add some data to the AsyncToken and when the call returns you can check what the data was and use that to run different code. For example: myService = new RemoteObject(myDestination); myService.addEventListener(ResultEvent.RESULT, resultHandler); var myToken:AsyncToken = myService.getPeople(); myToken.data = getPeople; myToken.myService.getPlaces(); myToken.data = getPlaces; private function resultHandler(event:ResultEvent):void { switch(event.token.data) { case getPeople: // Do the stuff for getPeople break; case getPlaces: // Do the stuff for getPlaces break; } } So, if you have a separate event listener and function for each call you make, then Flex will work just as well. It is just a different way to do things. Also note that data can be anything you want like an object or whatever. --- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: What is AsyncToken and why is it preferred over just calling the Remote Object's method and adding listeners to the method for the result and fault? This class provides a place to set additional or token-level data for asynchronous RPC operations. It also allows an IResponder to be attached for an individual call. What is an example of why you would need to attach the IReponder (addResponser) to a particular method call? Again, I see on another site this In you application you have multiple service calls happening at the same time and you need to know which data coming back belongs to which call.. Calling the same method/service (getPeople) multiple times in the same instance or just calling multiple methods (getPeople, getPlaces, getThings) at the same time? I never had a problem with Flex mixing up the results of multiple methods being called before as a view loads up.. Thanks for any info you can provide.
[flexcoders] Re:Flex Builder 3 for Linux updated
Life is short. Microsoft is aggressive, and HTML5 looms. Without cross-platform support for developers and users Flex and the Flash Platform can't compete. Flex had a decent chance to become more than a promising product, but the end of that opportunity is in sight. Without strong Linux support, Flex will be a casualty of the RIA war; the question has become when Flex will cease to be a viable business decision. This loss was preventable. I say this in the past tense, because dithering only begets more dithering. Borland's JBuilder died because of dithering, and Borland died in large part because they did not respond appropriately to Microsoft and Eclipse. Big Bill is likely to win again, using the same tried-and-true script, while playing clean. Mike
Re: [flexcoders] Re:Flex Builder 3 for Linux updated
It would be nice to mention in this mail that no effort has been done to make it compatible with Eclipse 3.5/ 3.4.1 All they had to do is to integrate those two patches: http://blog.danyul.id.au/?p=68 http://www.jamesward.com/2009/09/29/flex-builder-3-on-eclipse-3-5/ The alpha 5 version is still compatible only with Eclipse =3.40. 2009/11/25 Michael Slinn msl...@mslinn.com Life is short. Microsoft is aggressive, and HTML5 looms. Without cross-platform support for developers and users Flex and the Flash Platform can't compete. Flex had a decent chance to become more than a promising product, but the end of that opportunity is in sight. Without strong Linux support, Flex will be a casualty of the RIA war; the question has become when Flex will cease to be a viable business decision. This loss was preventable. I say this in the past tense, because dithering only begets more dithering. Borland's JBuilder died because of dithering, and Borland died in large part because they did not respond appropriately to Microsoft and Eclipse. Big Bill is likely to win again, using the same tried-and-true script, while playing clean. Mike
Re: [flexcoders] Flash Builder 4 for Linux Apha3 Released!
run is working but not debug... in the debug perspective, the app gets terminated before even being launched. I've installed air2 sdk. thomas parquier --- http://www.web-attitude.fr/realisations/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056 2009/11/23 feiy eshang...@gmail.com this version fixed the can't run/debug air bug! more info:http://code.google.com/p/fb4linux/ 闲云孤鹤 - 清冷香中抱膝吟
Re: [flexcoders] Flex 3: AIR Local Database
The answer to your question about large scale is yes, AIR + SQLite can handle large datasets but with some caveats. I have a SQLite database that is several hundred megabytes. The main tables contain 4 million rows, 275000 rows, and 3500 rows. Queries that join these tables, when the query makes use of indexes, execute in under 100 milliseconds. Snappy. However, some things in the AIR implementation of SQLite are causing index optimizations with the LIKE() operator not to work, both in regular statements and in prepared statements. I am not sure what these things are because the differences between the AIR implementation of SQLite and SQLite proper haven't been documented. They could be things like overloading certain core SQLite functions, or compiling statements/prepared statements with one of the functions that cause the optimizer not to use an index. As a result of these mysterious things, if you run a query like SELECT * from MEMBERSHIP where MEMBER_LASTNAME LIKE 'Johns%' the query will do a full table scan. Do a more complex column value starts-with query that involves joins, and the table scan can translate to very poor performance. For example, when I execute my query at the SQLITE3.EXE command-line, where the index IS used, the query executes in under 100ms but the identical query takes 45-50 seconds in AIR. Also, to keep the front-end responsive when working with large datasets, you will have to use asynchronous data connections not synchronous connections. The coding is somewhat more complicated but also I found the AIR debugger to be less than robust when working with asynchronous connections and data events. However, everything worked OK with Responders, so I'd recommend the use of responder objects over the event-dispatch architecture. I have no experience to offer you with concurrency issues and SQLite. My AIR + local-db application is single-user. Regards TR jwc_wensan wrote: In all the articles I have read and some examples, it only talks about using SQLite as the database on the users' PC/Mac. Is that the only database that can be used locally? Can that database handle a large-scale commercial AIR app with tens of thousands of records? Also, since the AIR app is installed on the users PC/Mac, is there any reason to use mx:Modules? If the user needs/requires that data remain local, is AIR the best solution? Does Flex 4 solve any issues? Thoughts, options, suggestions? Thanks in advance, Jack
[flexcoders] where to get official answer to question about AIR's SQLite implementation and LoadableExtensions mechanism support?
A simple function I need does not exist in the SQLite engine core but the SQLite gurus are telling me to write my own function in C and load it at runtime as a loadable extension. (I have good reasons, BTW, for not wanting the function to execute in the client--it really belongs in the back-end.) http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions The LoadableExtensions mechanism is disabled by default, and Adobe in its implementation of SQLite may not have enabled the LoadableExtensions mechanism; or if it is enabled, a developer does not know whether it is officially enabled or an undocumented use-at-your-own-risk feature. Where would one get an official answer to the LoadableExtension supported/not-supported question? I've tried the AIR forum at Adobe but my question was not answered there. Thanks
Re: [flexcoders] MAC : TextInput focus
Julian, Still the focus is not set:( in the text input filed even after setting callLater(myComp.setFocus) and more thing is keyboard events wont work, ie. i mean clicking on tab wont work.Right now i m calling myComp.setFocus in creation complete event handler. *code Snippet* creation complete event handler private function init():void { /// some action script code here callLater(this.setFocus); } P.N: This happens only in safari browser Thanks, Suman
[flexcoders] Can't Listen to component?
I am getting an error on the line that starts with myUserCntr. which is 1061: Call to a possibly undefined method addListener through a reference with static type comps:userCntr. Can kind person tell me where I am going wrong here as index.mxml needs to listen for a dispatch event on one of its components the component is MXML'ed into the index.mxml file rather than created through actionscript? - Stephen === index.mxml The Main Display === ... import flash.events.Event; private function init():void { myUserCntr.addListener(OpenAdmnCntr, openAdmnCntrHandler); } private function openAdmnCntrHandler():void { // Do something. } ... ... comps:userCntr id=myUserCntr/ = userCntr.mxml (The Component) = ... mx:Metadata [Event(name=OpenAdmnCntr, type=flash.events.Event)] /mx:Metadata ... ... dispatchEvent(new Event('OpenAdmnCntr')); ...
[flexcoders] Re: Can't Listen to component?
addEventListener instead. -TH --- In flexcoders@yahoogroups.com, criptopus sd_br...@... wrote: I am getting an error on the line that starts with myUserCntr. which is 1061: Call to a possibly undefined method addListener through a reference with static type comps:userCntr. Can kind person tell me where I am going wrong here as index.mxml needs to listen for a dispatch event on one of its components the component is MXML'ed into the index.mxml file rather than created through actionscript? - Stephen === index.mxml The Main Display === ... import flash.events.Event; private function init():void { myUserCntr.addListener(OpenAdmnCntr, openAdmnCntrHandler); } private function openAdmnCntrHandler():void { // Do something. } ... ... comps:userCntr id=myUserCntr/ = userCntr.mxml (The Component) = ... mx:Metadata [Event(name=OpenAdmnCntr, type=flash.events.Event)] /mx:Metadata ... ... dispatchEvent(new Event('OpenAdmnCntr')); ...
[flexcoders] Drawing glitch
I have a banner consisting of a left-to-right gradient (ending in white) followed by a logo. The programmatic skin below is used as a border skin of an HBox. It looks great, and you can resize the window, but if you maximize it, the darker color of the gradient appears on either side of the logo. The MXML structure is as follows. mx:HBox width=100% styleName=bannerBox verticalAlign=middle mx:HBox width=100% height=100% styleName=bannerGradient verticalAlign=middle mx:VBox paddingTop=0 paddingBottom=0 verticalGap=0 mx:Label text={resourceManager.getString('admin', 'productName_'+brand)} styleName=productTitle/ mx:Label text={resourceManager.getString('admin', 'applicationName_'+brand)} styleName=applicationTitle/ /mx:VBox /mx:HBox mx:Image id=logo source={resourceManager.getObject('admin', 'companyLogo_'+brand)} / /mx:HBox Any ideas? - Richard public class GradientBackground extends ProgrammaticSkin { override public function get measuredWidth():Number { return 20; } override public function get measuredHeight():Number { return 20; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { var fillColors:Array = getStyle(fillColors); var fillAlphas:Array = getStyle(fillAlphas); var cornerRadius:int = getStyle(cornerRadius); var gradientType:String = getStyle(gradientType); var angle:Number = getStyle(angle); var focalPointRatio:Number = getStyle(focalPointRatio); // Default values, if styles aren't defined if (fillColors == null) fillColors = [0xEE, 0x99]; if (fillAlphas == null) fillAlphas = [1, 1]; if (gradientType == || gradientType == null) gradientType = linear; if (isNaN(angle)) angle = 90; if (isNaN(focalPointRatio)) focalPointRatio = 0.5; var matrix:Matrix = this.rotatedGradientMatrix(0,0,unscaledWidth,unscaledHeight,angle * Math.PI / 180); this.drawRoundRect(0,0, unscaledWidth,unscaledHeight, cornerRadius*.5, fillColors, fillAlphas, matrix, gradientType); }
[flexcoders] How to know when a popup component is visible?
I had a thread going here about how to show progress before a potentially long-running but synchronous operation (in my case encoding a DisplayObject as a PNG or JPEG to add to an AlivePDF PDF. Since I can't seem to force a busy cursor (ironic), one of the suggestions was to pop up a window before starting the encoding. But I've tried listening to creationComplete, render, show, addedToStage etc. etc., and in all cases the popup doesn't appear until the encoding is complete. I was unable to find any event dispatched by the PopupManager either. Help!
[flexcoders] Using custom subclasses as children of larger components
Is there way to tell a TabBar component to use custom subclass of Button for each of its tabs? -- --Joel Stransky stranskydesign.com
[flexcoders] how to get an array as a part from another array?
Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] When does 0.2 and 0.1 not equal 0.3?
I have encountered an odd bug. In the process of creating a little numeric stepper component (a text box with an up/down stepper beside it) I have found an odd rounding error. Starting from 0.0 and adding 0.1 increments, I get the follow console output. currentNumber: 0 increment: 0.1 result: 0.1 currentNumber: 0.1 increment: 0.1 result: 0.2 currentNumber: 0.2 increment: 0.1 result: 0.30004 As you can see, .2 + .1 is yielding 0.30004. This behaviour happens at at many numbers actually. You can verify this yourself by simply doing a: trace( (0.1 + 0.2) ); The other flex developer at our company can also see this error, so I don't think it's isolated to my box or particular build. Does anyone know anything about this?
Re: [flexcoders] When does 0.2 and 0.1 not equal 0.3?
Yes, you've discovered the joys of floating point maths. Not a bug, just a fact of life for anyone working in just about every programming language there is. Work in integers if you want integer results, or use the functions under the Math class to round things to suit your needs. Guy On 26/11/2009, at 7:33 AM, kidl33t wrote: I have encountered an odd bug. In the process of creating a little numeric stepper component (a text box with an up/down stepper beside it) I have found an odd rounding error. Starting from 0.0 and adding 0.1 increments, I get the follow console output. currentNumber: 0 increment: 0.1 result: 0.1 currentNumber: 0.1 increment: 0.1 result: 0.2 currentNumber: 0.2 increment: 0.1 result: 0.30004 As you can see, .2 + .1 is yielding 0.30004. This behaviour happens at at many numbers actually. You can verify this yourself by simply doing a: trace( (0.1 + 0.2) ); The other flex developer at our company can also see this error, so I don't think it's isolated to my box or particular build. Does anyone know anything about this?
[flexcoders] Re: how to get an array as a part from another array?
Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhu...@... wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: how to get an array as a part from another array?
private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return (person.isSenior == true?true:false); } private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); var seniors:Array = ac.toArray().filter(seniorsOnly); --- In flexcoders@yahoogroups.com, turbo_vb timh...@... wrote: Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Combo Box Data Grid
If I have a table with a field that contains the numbers 0,1,2,3 and I want them to be displayed in the data grid say as Non-Member, Member,Instructor,Administrator and be able to select them with a combo box only to have the numeric value posted back to the table. How do you do it?
Re: [flexcoders] how to get an array as a part from another array?
by using a filter funtion can return you the array with isSenior==true; but i need an arry of id's only. in this case, i need an returned array like this: [1, 4, 5] not [ {id:1, name:bob, sex:m, isSenior:true}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ] can i do that without a loop? jamesfin-2 wrote: private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return (person.isSenior == true?true:false); } private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); var seniors:Array = ac.toArray().filter(seniorsOnly); --- In flexcoders@yahoogroups.com, turbo_vb timh...@... wrote: Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26521572.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: how to get an array as a part from another array?
Nope, going to have to loop and create the new array manually. Even using a filterFunction is still looping; behind the scenes. -TH --- In flexcoders@yahoogroups.com, coder3 rrhu...@... wrote: by using a filter funtion can return you the array with isSenior==true; but i need an arry of id's only. in this case, i need an returned array like this: [1, 4, 5] not [ {id:1, name:bob, sex:m, isSenior:true}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ] can i do that without a loop? jamesfin-2 wrote: private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return (person.isSenior == true?true:false); } private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); var seniors:Array = ac.toArray().filter(seniorsOnly); --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote: Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26521572.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] how to get an array as a part from another array?
right. filtering is a loop actually. but it just keep our code look more clean. all right, i guest there is no short cut to get the partial array. thanks turbo_vb wrote: Nope, going to have to loop and create the new array manually. Even using a filterFunction is still looping; behind the scenes. -TH --- In flexcoders@yahoogroups.com, coder3 rrhu...@... wrote: by using a filter funtion can return you the array with isSenior==true; but i need an arry of id's only. in this case, i need an returned array like this: [1, 4, 5] not [ {id:1, name:bob, sex:m, isSenior:true}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ] can i do that without a loop? jamesfin-2 wrote: private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return (person.isSenior == true?true:false); } private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); var seniors:Array = ac.toArray().filter(seniorsOnly); --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote: Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26521572.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--tp26519700p26521778.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: how to get an array as a part from another array?
Seems like it might be about the same amount of code though: var myIdArray:Array = []; for each ( var myObject:MyObject in myArrayCollection ) { if ( myObject.isSenior ) myIdArray.push( myObject.id ); } -TH --- In flexcoders@yahoogroups.com, coder3 rrhu...@... wrote: right. filtering is a loop actually. but it just keep our code look more clean. all right, i guest there is no short cut to get the partial array. thanks turbo_vb wrote: Nope, going to have to loop and create the new array manually. Even using a filterFunction is still looping; behind the scenes. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: by using a filter funtion can return you the array with isSenior==true; but i need an arry of id's only. in this case, i need an returned array like this: [1, 4, 5] not [ {id:1, name:bob, sex:m, isSenior:true}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ] can i do that without a loop? jamesfin-2 wrote: private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return (person.isSenior == true?true:false); } private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); var seniors:Array = ac.toArray().filter(seniorsOnly); --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote: Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--\ tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--\ tp26519700p26521572.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--\ tp26519700p26521778.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: When does 0.2 and 0.1 not equal 0.3?
So to reliably add 0.1 and 0.2 I need to convert them to ints? This must be a joke, its not adding anything complicated. So is there a Flex wrapper for this? math.add(0.1, 0.2) ? How can we be sure that 2 numbers we just added equal the true sum? --- In flexcoders@yahoogroups.com, kidl33t kidl...@... wrote: I have encountered an odd bug. In the process of creating a little numeric stepper component (a text box with an up/down stepper beside it) I have found an odd rounding error. Starting from 0.0 and adding 0.1 increments, I get the follow console output. currentNumber: 0 increment: 0.1 result: 0.1 currentNumber: 0.1 increment: 0.1 result: 0.2 currentNumber: 0.2 increment: 0.1 result: 0.30004 As you can see, .2 + .1 is yielding 0.30004. This behaviour happens at at many numbers actually. You can verify this yourself by simply doing a: trace( (0.1 + 0.2) ); The other flex developer at our company can also see this error, so I don't think it's isolated to my box or particular build. Does anyone know anything about this?
[flexcoders] Re: how to get an array as a part from another array?
too much fun private var _arr:Array = new Array(); private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); ac.toArray().filter(seniorsOnly); } private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return(person.isSenior?_arr.push(person.id):false); } --- In flexcoders@yahoogroups.com, turbo_vb timh...@... wrote: Seems like it might be about the same amount of code though: var myIdArray:Array = []; for each ( var myObject:MyObject in myArrayCollection ) { if ( myObject.isSenior ) myIdArray.push( myObject.id ); } -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: right. filtering is a loop actually. but it just keep our code look more clean. all right, i guest there is no short cut to get the partial array. thanks turbo_vb wrote: Nope, going to have to loop and create the new array manually. Even using a filterFunction is still looping; behind the scenes. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: by using a filter funtion can return you the array with isSenior==true; but i need an arry of id's only. in this case, i need an returned array like this: [1, 4, 5] not [ {id:1, name:bob, sex:m, isSenior:true}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ] can i do that without a loop? jamesfin-2 wrote: private function seniorsOnly(person:*, index:int, arr:Array):Boolean{ return (person.isSenior == true?true:false); } private function init():void{ var ac:ArrayCollection = new ArrayCollection([ {id:1, name:bob, sex:m, isSenior:true}, {id:2, name:kathy, sex:f, isSenior:false}, {id:3, name:joe, sex:m, isSenior:false}, {id:4, name:barb, sex:f, isSenior:true}, {id:5, name:pete, sex:m, isSenior:true} ]); var seniors:Array = ac.toArray().filter(seniorsOnly); --- In flexcoders@yahoogroups.com, turbo_vb TimHoff@ wrote: Could use a filterFunction. -TH --- In flexcoders@yahoogroups.com, coder3 rrhuang@ wrote: Hi All, I have a ArrayCollection, it contains id, name, sex, isSenior, etc. now i only need an array of id through that list. what's the quickest way to get an array of ids if isSenior is true, without using a loop? thanks C -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--\ tp26519700p26519700.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--\ tp26519700p26521572.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/how-to-get-an-array-as-a-part-from-another-array--\ tp26519700p26521778.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Should I buy Lynda.com Flex 3 essential training to learn Flex?
I wonder that if I buy Flex Essential training from Lynda.com I will learn the material easier? I have no programming background. Thx for your time
Re: [flexcoders] Should I buy Lynda.com Flex 3 essential training to learn Flex?
I am a member of lynda.com and have also seen the Total Training Flex training. Of the two, I preferred the Total Training product, but neither is for REAL beginners. Lynda does have a Flash title on programming that¹s put together for designers. That¹s a good starting place because Flash uses Actionscript just like Flex. There¹s also www.freeflextraining.com. You might try there first, since it¹s free, and see how much of it you understand. Good luck! Kevin On 11/25/09 4:24 PM, fred44455 fred44...@yahoo.com wrote: I wonder that if I buy Flex Essential training from Lynda.com I will learn the material easier? I have no programming background. Thx for your time
[flexcoders] How do I set the background image in Flex 4?
How do I set the background-image and background-size styles on the Application in Flex 4?
Re: [flexcoders] Re: When does 0.2 and 0.1 not equal 0.3?
This is a pretty well known limitation of floating point numbers. A workaround: http://joshblog.net/2007/01/30/flash-floating-point-number-errors/ Another option around this is to use the toPrecision() function of Number/Int to convert a number to a String and then compare the Strings. var num1:Number = 0.1; var num2:Number = 0.2; var num3:Number = num1 + num2; trace(num3:+num3); trace(is 0.3?+(num3 == 0.3)); trace(num3.toPrecision()+num3.toPrecision(3)); trace(is precise 0.3?+(num3.toPrecision(3) == (0.3).toPrecision(3))); More info: http://www.google.com/search?q=floating+point+math+errors On Wed, Nov 25, 2009 at 5:11 PM, tntomek tnto...@yahoo.com wrote: So to reliably add 0.1 and 0.2 I need to convert them to ints? This must be a joke, its not adding anything complicated. So is there a Flex wrapper for this? math.add(0.1, 0.2) ? How can we be sure that 2 numbers we just added equal the true sum? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, kidl33t kidl...@... wrote: I have encountered an odd bug. In the process of creating a little numeric stepper component (a text box with an up/down stepper beside it) I have found an odd rounding error. Starting from 0.0 and adding 0.1 increments, I get the follow console output. currentNumber: 0 increment: 0.1 result: 0.1 currentNumber: 0.1 increment: 0.1 result: 0.2 currentNumber: 0.2 increment: 0.1 result: 0.30004 As you can see, .2 + .1 is yielding 0.30004. This behaviour happens at at many numbers actually. You can verify this yourself by simply doing a: trace( (0.1 + 0.2) ); The other flex developer at our company can also see this error, so I don't think it's isolated to my box or particular build. Does anyone know anything about this?
RE: [flexcoders] How do I set the background image in Flex 4?
Not sure how out of sync the examples are (I'm guessing they're quite old since I don't see any Application control bar logic in the skins), but these may help. Short answer: You need to create a custom skin. http://blog.flexexamples.com/2009/03/22/setting-a-background-image-on-an-fxapplication-in-flex-gumbo/ http://blog.flexexamples.com/2009/03/23/setting-a-repeating-background-image-on-an-fxapplication-in-flex-gumbo/ Peter From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dorkie dork from dorktown Sent: Wednesday, November 25, 2009 4:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How do I set the background image in Flex 4? How do I set the background-image and background-size styles on the Application in Flex 4?
Re: [flexcoders] Should I buy Lynda.com Flex 3 essential training to learn Flex?
You should start with Flex 4 sdk documentation and developer guide pdfs from Adobe. On Thu, Nov 26, 2009 at 6:12 AM, Kevin Mulvihill kbmulvih...@gmail.comwrote: I am a member of lynda.com and have also seen the Total Training Flex training. Of the two, I preferred the Total Training product, but neither is for REAL beginners. Lynda does have a Flash title on programming that’s put together for designers. That’s a good starting place because Flash uses Actionscript just like Flex. There’s also www.freeflextraining.com. You might try there first, since it’s free, and see how much of it you understand. Good luck! Kevin On 11/25/09 4:24 PM, fred44455 fred44...@yahoo.com wrote: I wonder that if I buy Flex Essential training from Lynda.com I will learn the material easier? I have no programming background. Thx for your time
Re: [flexcoders] Should I buy Lynda.com Flex 3 essential training to learn Flex?
+1 for learning Flex 4. There's a lot that's changed and by the time you're ready Flex 4 will ready... On Wed, Nov 25, 2009 at 8:20 PM, Gautam P p.gau...@gmail.com wrote: You should start with Flex 4 sdk documentation and developer guide pdfs from Adobe. On Thu, Nov 26, 2009 at 6:12 AM, Kevin Mulvihill kbmulvih...@gmail.comwrote: I am a member of lynda.com and have also seen the Total Training Flex training. Of the two, I preferred the Total Training product, but neither is for REAL beginners. Lynda does have a Flash title on programming that’s put together for designers. That’s a good starting place because Flash uses Actionscript just like Flex. There’s also www.freeflextraining.com. You might try there first, since it’s free, and see how much of it you understand. Good luck! Kevin On 11/25/09 4:24 PM, fred44455 fred44...@yahoo.com wrote: I wonder that if I buy Flex Essential training from Lynda.com I will learn the material easier? I have no programming background. Thx for your time
Re: [flexcoders] How do I set the background image in Flex 4?
Thanks On Wed, Nov 25, 2009 at 7:26 PM, Peter DeHaan pdeh...@adobe.com wrote: Not sure how out of sync the examples are (I’m guessing they’re quite old since I don’t see any Application control bar logic in the skins), but these may help. Short answer: You need to create a custom skin. http://blog.flexexamples.com/2009/03/22/setting-a-background-image-on-an-fxapplication-in-flex-gumbo/ http://blog.flexexamples.com/2009/03/23/setting-a-repeating-background-image-on-an-fxapplication-in-flex-gumbo/ Peter *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *dorkie dork from dorktown *Sent:* Wednesday, November 25, 2009 4:48 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How do I set the background image in Flex 4? How do I set the background-image and background-size styles on the Application in Flex 4?
RE: [SPAM] [flexcoders] Combo Box Data Grid
This can get little tricky. You need to have an itemRenderer, that when triggered by set data() (actually do the work in commitProperties) loops over the combo box data provider until it matches the current column+line data item value, then sets the selectedIndex of the combo box. Thate are several examples of this available. I have one here: http://www.cflex.net/showFileDetails.cfm?ObjectID=767 It is more complex than absolutely necessary because I wanted it to be generic and reusable. Doing it for a one-off, with a hard coded data field and dataProvider is much simpler. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of criptopus Sent: Wednesday, November 25, 2009 5:28 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Combo Box Data Grid If I have a table with a field that contains the numbers 0,1,2,3 and I want them to be displayed in the data grid say as Non-Member, Member,Instructor,Administrator and be able to select them with a combo box only to have the numeric value posted back to the table. How do you do it?
RE: [SPAM] [flexcoders] cairngorm store example - newbie binding question
The binding mechanism will cause any function to be called if one of its arguments is bindable and changes. I don't know the particular app, but I suspect model.workflowState is bindable. Bindable really only applies to properties, whether implemented as public variables or as getter/setters. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of normc_actionscript Sent: Tuesday, November 24, 2009 8:59 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] cairngorm store example - newbie binding question Greetings Flex pros: In the modified cairngorm store (if you're familiar), file ProductsAndCheckoutControlBar.mxml, there's: mx:Image source={ getProductThumbnailsButton( model.workflowState ) } That function (getProductThumbnailsButton) is not marked as 'bindable' so how does the binding happen? The var model is the only thing marked as bindable in the file. This is the function: public function getProductThumbnailsButton( enforceBining : Number ) : Class { var model : ShopModelLocator = ShopModelLocator.getInstance(); var result : Class = model.assets.thumbOff; if ( model.workflowState == ShopModelLocator.VIEWING_PRODUCTS_IN_THUMBNAILS ) { result = model.assets.thumbOn; } return result; }
RE: [SPAM] [flexcoders] Re: Questions I always wanted to know the answers to - AsyncTokens
Yes, that is how I normally use AsyncToken. You should know though that it also provides for directly assigning handler/callback functions if you prefer that style. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Wednesday, November 25, 2009 11:05 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Questions I always wanted to know the answers to - AsyncTokens Using an AsyncToken allows you to have only one event listener and one function to handle all responses from a remote procedure call. You add some data to the AsyncToken and when the call returns you can check what the data was and use that to run different code. For example: myService = new RemoteObject(myDestination); myService.addEventListener(ResultEvent.RESULT, resultHandler); var myToken:AsyncToken = myService.getPeople(); myToken.data = getPeople; myToken.myService.getPlaces(); myToken.data = getPlaces; private function resultHandler(event:ResultEvent):void { switch(event.token.data) { case getPeople: // Do the stuff for getPeople break; case getPlaces: // Do the stuff for getPlaces break; } } So, if you have a separate event listener and function for each call you make, then Flex will work just as well. It is just a different way to do things. Also note that data can be anything you want like an object or whatever. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Wally Kolcz wko...@... wrote: What is AsyncToken and why is it preferred over just calling the Remote Object's method and adding listeners to the method for the result and fault? This class provides a place to set additional or token-level data for asynchronous RPC operations. It also allows an IResponder to be attached for an individual call. What is an example of why you would need to attach the IReponder (addResponser) to a particular method call? Again, I see on another site this In you application you have multiple service calls happening at the same time and you need to know which data coming back belongs to which call.. Calling the same method/service (getPeople) multiple times in the same instance or just calling multiple methods (getPeople, getPlaces, getThings) at the same time? I never had a problem with Flex mixing up the results of multiple methods being called before as a view loads up.. Thanks for any info you can provide.
[flexcoders] git version control support
Anyone know when / how git will be supported within flex builder?
[flexcoders] How to get updated value from dataGrid
Hi, I set one column in dataGrid as editable='true',so we can update values with dataGrid.I try to use acPeopleUpdate to get updated value from dataGrid, but acPeopleUpdate get values that is before updated. Please help me know how to get updated values from dataGrid. Thanks code: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() layout=absolute backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FEFEFE, #FEFEFE] horizontalScrollPolicy=off mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.utils.ObjectUtil; [Bindable] private var acPeople:ArrayCollection; private var acPeopleUpdate:ArrayCollection; private function init():void{ acPeople = new ArrayCollection([{name:Mark,phone:416-123-1234,age:25}, {name:Joe,phone:416-123-1234,age:55},{name:David,phone:416-123-1234,age:29} ]) } private function updateAC():void{ acPeopleUpdate = dg1.dataProvider as ArrayCollection; } ]] /mx:Script mx:DataGrid id=dg1 x=0 y=116 width=100% editable=true dataProvider={acPeople} itemEditEnd=updateAC() mx:columns mx:DataGridColumn editable=false headerText=Name dataField=name/ mx:DataGridColumn editable=false headerText=Phone dataField=phone/ mx:DataGridColumn editable=true headerText=Age dataField=age / /mx:columns /mx:DataGrid /mx:WindowedApplication
Re: [flexcoders] How to get updated value from dataGrid
I usually add a listener to my ArrayCollection. e.g. collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, handler); http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_5.html On Thu, Nov 26, 2009 at 1:04 PM, markflex2007 markflex2...@yahoo.comwrote: Hi, I set one column in dataGrid as editable='true',so we can update values with dataGrid.I try to use acPeopleUpdate to get updated value from dataGrid, but acPeopleUpdate get values that is before updated. Please help me know how to get updated values from dataGrid. Thanks code: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() layout=absolute backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FEFEFE, #FEFEFE] horizontalScrollPolicy=off mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.utils.ObjectUtil; [Bindable] private var acPeople:ArrayCollection; private var acPeopleUpdate:ArrayCollection; private function init():void{ acPeople = new ArrayCollection([{name:Mark,phone:416-123-1234,age:25}, {name:Joe,phone:416-123-1234,age:55},{name:David,phone:416-123-1234,age:29} ]) } private function updateAC():void{ acPeopleUpdate = dg1.dataProvider as ArrayCollection; } ]] /mx:Script mx:DataGrid id=dg1 x=0 y=116 width=100% editable=true dataProvider={acPeople} itemEditEnd=updateAC() mx:columns mx:DataGridColumn editable=false headerText=Name dataField=name/ mx:DataGridColumn editable=false headerText=Phone dataField=phone/ mx:DataGridColumn editable=true headerText=Age dataField=age / /mx:columns /mx:DataGrid /mx:WindowedApplication
[flexcoders] How to start learning Flex 4? There is no book out there!!
I am a newbie and want to learn Flex. Now I was told to skip Flex 3 and get into Flex 4 directly. But there is no book available for Flex 4. I can't learn from Flex 4 documentation , I don't even know Flex 3 and how to program. Is Flex 3 that different from Flex 4? I have 3 books on Flex 3 that I purchased today , can I go head and learn from those 3 books then purchasing the Flex 4 books when they will be out?
RE: [flexcoders] MAC : TextInput focus
Are you trying to start the app with focus so you can just start typing? AFAIK this is only possible in IE. It is a browser plug-in issue. Hopefully newer browsers will solve this issue. 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 suman gayakwad Sent: Wednesday, November 25, 2009 8:55 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] MAC : TextInput focus Julian, Still the focus is not set:( in the text input filed even after setting callLater(myComp.setFocus) and more thing is keyboard events wont work, ie. i mean clicking on tab wont work.Right now i m calling myComp.setFocus in creation complete event handler. code Snippet creation complete event handler private function init():void { /// some action script code here callLater(this.setFocus); } P.N: This happens only in safari browser Thanks, Suman