[flexcoders] Searching through an ArrayCollection of Objects
Hi, I was wondering if there are any quick ways to solving this, quick as in CPU time, not developer time... I have an Array Collection of VO's called contact which has two properties... var myAC : ArrayCollection = new ArrayCollection(); var myContact : Contact = new Contact(); myContact.name = bob; myContact.age = 30; myAC.addItem(myContact); var myContact : Contact = new Contact(); // Also, Is this bad practice? Am I loosing the reference to previous myContatc? I'm sure someone mentioned this to me once on this list? myContact.name = bill; myContact.age = 31; myAC.addItem(myContact); var myContact : Contact = new Contact(); myContact.name = sarah; myContact.age = 28; myAC.addItem(myContact); I now want to write a function which takes the ArrayCollection to scan, the name property value of the object and it will return the age property of the first found VO. At the moment, I'm just looping through the collection without sorting them and it all seems to work. I've had a look at the Array API and have found sortOn and lastIndexOf(), etc but am thinking is there a time benefit in sorting first and then looping or is there a super function that does exactly what I want and super efficient? I was thinking is it worth converting to XML then using E4X queries but the conversion is probably time comsuming. In reality myAC will be about 300 elements so maybe a brute force looping scan might be good enough but having started this, I'd like to hear what you others think. Thanks in advance, Nick
[flexcoders] Create rooms using FMS
Hi, How to create rooms in flex using FMS3.0
Re: [flexcoders] Create rooms using FMS
Hi, What you exactly want to do? You can specify a room name in NetConnection.connect method eg: nc.connect(rtmp://locahost/myapp/myroom); This will connect the client to room *myroom *of application *myapp*. Make sure that you are using unique room name. Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 2 March 2010 16:29, venkat eswar cooler...@yahoo.com wrote: Hi, How to create rooms in flex using FMS3.0
Re: [flexcoders] Searching through an ArrayCollection of Objects
Hi, You have to create the copy of ArrayCollection using the Utility.Copy command which we help you to keep the copy of original one and create the copy of existing one. Apply the filter condition on newly created ArrayCollection. Hope this will help you Regards, Krunal Panchal *panchal_...@yahoo.com From: Nick Middleweek n...@middleweek.co.uk To: flexcoders@yahoogroups.com Sent: Tue, 2 March, 2010 14:13:32 Subject: [flexcoders] Searching through an ArrayCollection of Objects Hi, I was wondering if there are any quick ways to solving this, quick as in CPU time, not developer time... I have an Array Collection of VO's called contact which has two properties.. . var myAC : ArrayCollection = new ArrayCollection( ); var myContact : Contact = new Contact(); myContact.name = bob; myContact.age = 30; myAC.addItem( myContact) ; var myContact : Contact = new Contact(); // Also, Is this bad practice? Am I loosing the reference to previous myContatc? I'm sure someone mentioned this to me once on this list? myContact.name = bill; myContact.age = 31; myAC.addItem( myContact) ; var myContact : Contact = new Contact(); myContact.name = sarah; myContact.age = 28; myAC.addItem( myContact) ; I now want to write a function which takes the ArrayCollection to scan, the name property value of the object and it will return the age property of the first found VO. At the moment, I'm just looping through the collection without sorting them and it all seems to work. I've had a look at the Array API and have found sortOn and lastIndexOf( ), etc but am thinking is there a time benefit in sorting first and then looping or is there a super function that does exactly what I want and super efficient? I was thinking is it worth converting to XML then using E4X queries but the conversion is probably time comsuming. In reality myAC will be about 300 elements so maybe a brute force looping scan might be good enough but having started this, I'd like to hear what you others think. Thanks in advance, Nick
[flexcoders] bind ColorMatrixFilter to php (Apply ActionScript graphic manipulation to php)
Hello, I am working on an online photo manipulation project. Users load images, modify them, and save modifications. Later, a high quality version of the image is printed. Due to specification constraints, the printing process must be performed by php. I've been looking, without success, for a way to bind actionscript modifications with php. For instance, the user applies some saturation modifications to an image, and saves them. Since we want non-destructive image editing, the modifications are saved in a database(actually, the corresponding ColorMatrixFilter values). Later, when the user loads his images again, the modifications are loaded and reapplied to the image. When launching the print job, thousands of high quality processed image must be handled, in php. So, my question is : can anyone point me in some direction on how to make a bridge between these ColorMatrixFilter values to a graphic process, writen in php (using GD or anything else for example) ? In my idea, the php script would load the modifications from the table, maybe use a convert script, and then apply the filters to the high def image, before printing. Thank you for your time, and possible answers. Sorry for my english.
[flexcoders] How you keep the debugger from tracing through the SDK files?
Never did that before for me. Just started happening and can't figure out why, even when using step over on every step! I just would likek it to step through the source files that I created only. I give. Thanks for any help.
Re[flexcoders] strict user input in TextInput
Hi all. How would I achieve the task of restricting user input based on the current contents of the TextInput? I am aware of the restrictChars property but that doesn't help since it applies a blanket rule as to which characters are allowed/not allowed. An example here would be: allow the user to input a number with no more than a precision of 2. In this case, as soon as the user enters 12.34 any more keystrokes in the TextInput should become no-ops. I did try adding event listeners to the KeyboardEvent.UP_KEY and KeyboardEvent.DOWN_KEY but it seems that you can't stop the propagation or prevent the default of keyboard events. Any suggestions here would be very much appreciated. TIA, sasuke -- View this message in context: http://old.nabble.com/Restrict-user-input-in-TextInput-tp27756858p27756858.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Bindings within a dynamically created container fail.
--- In flexcoders@yahoogroups.com, chefbrittison britton.j...@... wrote: I have a panel which is being created dynamically within a sidebar depending on the context of the main display area. When the panel is added to the display list, the bindings don't appear to fire correctly. In this case, I have a mx:List that is bound to an arraycollection that doesnt work. Any idea what is causing this or what I can do to fix it. Calling the executeBindings() method on the bound component upon creationComplete seems to work Ok for lists but fails when a mx:Tree is contained within the panel. Here's my panel code: ?xml version=1.0 encoding=utf-8? CollapsiblePanel xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% title=Query Variables creationComplete=handleCreationComplete() mx:Script ![CDATA[ import com.app.view.editor.tablelayout.view.stub.VariableElementStub; import com.app.view.editor.tablelayout.view.stub.QueryVariableStub; import com.app.view.editor.api.query.ViewQueryVariable; import mx.collections.ArrayCollection; [Bindable] private var _queryVariables:ArrayCollection; public static const PANEL_ID:String = variableListPanel; public function get panelId():String { return PANEL_ID; } public function set queryVariables(value:ArrayCollection):void { this._queryVariables = value; } mx:List id=variableList width=100% alternatingItemColors=[#FF, #F1F1F1] dataProvider={listItems} labelField=label iconField=icon dragEnabled=true / /CollapsiblePanel I'd be surprised if this compiles, since the CollapsiblePanel tag contains a reference to a function, handleCreationComplete(), which does not appear in your (malformed) Script tag. Does that function contain anything that populates listItems (which I don't see a declaration for)? If not, maybe you should try binding to _queryVariables, which is the only ListCollectionView I see getting populated here. HTH; Amy
[flexcoders] What type of backend Java technology Flex Developer should know?
More and more Java is required to know for any Flex Developer who is looking for a new project employment. My question is simple :Java is very waste so from your personal experience what type of Java Technology are they requiring(in general)?. Please don't elaborate or debate on why Java is required just post What type of Java they want us to know. Thanks for your time.
RE: [flexcoders] Re: Does DataBinding to a function create a ChangeWatcher?
Thanks for the video, took a while to get through, but answered my questions throughly. I am going to forward it to the other Flex developers on my team I found it so helpful. Now, going to try to find other lectures by Labriola ;0 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of tntomek Sent: Monday, March 01, 2010 12:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Does DataBinding to a function create a ChangeWatcher? Hi Chris, Check this vid out: http://tv.adobe.com/watch/360flex-conference/diving-in-the-data-binding- waters-by-michael-labriola/ --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Christopher McArthur cmcart...@... wrote: I am doing some performance/memory cleanup in my rather large application and looking to reduce the number of eventListeners and changeWatchers I have and was curious about this: say I have some function function myFunc():String; that I data bind to an mx:Label's property label={myFunc()} I know this is a softbinding that is only udpated once, but is a ChangeWatcher created in this scenario? What about this one label={myFunc(this.myBindableVar)} Is there now a ChangeWatcher on myBindableVar? In general is it more efficient to use the invalidateProperties/commitProperties pattern instead of dataBinding when applicable, for the simple cases of binding to local properties? -Christopher image001.jpgimage002.jpg
Re: [flexcoders] Foreign interfaces
How about using the Fash Text Layout Framework? http://labs.adobe.com/technologies/textlayout/ Is that what you are going for? On 3/1/2010 5:45 AM, Christophe wrote: Hello, Is it possible to make an interface with Japanese or Chinese Characters with Flex ? Thank you, Christophe,
Re: [flexcoders] CHanges not taking effect
Clean the browser's history/cache. In FF, go to ToolsClear Recent History. I usually just do 'today' On 3/1/2010 9:31 PM, iloveyouwisconsin wrote: Weird problem on Flex 4. I make changes and can see them in design view. I then run the app and the changes don't take effect. I've tried to do a Project-clean. I've also tried to search for updates. Does this happen to otehrs often?
[flexcoders] Dumb Question - Transition after a module has loaded
I have my kids site where when they click a 'button' I want to have the module open in an iris effect. The modules load and are added to a canvas as a place holder. Can anyone tell me or point out how to apply an effect to a module?
[flexcoders] Re: Searching through an ArrayCollection of Objects
--- In flexcoders@yahoogroups.com, Krunal Panchal panchal_...@... wrote: Hi, You have to create the copy of ArrayCollection using the Utility.Copy command which we help you to keep the copy of original one and create the copy of existing one. Apply the filter condition on newly created ArrayCollection. You can just use a separate ListCollectionView that looks at the same source. No need to make a copy :)
[flexcoders] Dynamically create a Value Object...
The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra fields in it, which most clients don't need? As it stands right now, the Value Objects force us to make every database for every show exactly the same -- unless we modify the Value Objects for each individual show and re-compile a separate .SWF file for that show... If there were a way to write, say, an .XML file that the program could read and modify itself accordingly for each show, that would be brilliant. Is there a way to do that? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Dynamically create a Value Object...
I should also mention we're using CF9 on the back-end. So the VOs have to be defined in .CFC files as well. So if anyone can tell me how to do dynamic VOs in both CF9 and Flex, that'd be wonderful. Alternatively, if there's a way to transfer data between Flex and CF9 that doesn't involve VOs (but is still strongly structured and typed, like VOs are), then perhaps we need to do it that way? I'm extremely confused here... I've written this program from the beginning with statically-defined VOs, and now I discover that that's just not going to work. So if anyone can point me in the right direction to help me learn what my alternatives to statically-defined VOs are, I'd really appreciate it. I have found a couple of blog posts about bindable dynamic value objects, but only how to create them in Flex -- not how to export the data in them from Flex to CF9. And the posts are pretty darn confusing, anyway... Heck, at this point I'd be willing to PAY someone to teach me how to do this, one-on-one. I really need someone who's an expert in both Flex 3.5a and ColdFusion 9. Thanks, L. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra fields in it, which most clients don't need? As it stands right now, the Value Objects force us to make every database for every show exactly the same -- unless we modify the Value Objects for each individual show and re-compile a separate .SWF file for that show... If there were a way to write, say, an .XML file that the program could read and modify itself accordingly for each show, that would be brilliant. Is there a way to do that? Thanks, Laurence MacNeill Mableton, Georgia, USA
Re: [flexcoders] Dynamically create a Value Object...
Hi Laurence, I'm pretty new to Flex so there might be reasons to stick with Value Objects that I'm unaware of but you can definitely read and write XML and generate forms, layouts, etc on the fly based on the XML contents. I've used E4X to query XML data that I've sucked in from an HTTP call, modified the XML using E4X and pinged it back up to the HTTP server to save the XML data for later use. Hope that helps... Cheers, Nick -- http://blog.middleweek.co.uk/ On 2 March 2010 19:19, Laurence lmacne...@comcast.net wrote: The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra fields in it, which most clients don't need? As it stands right now, the Value Objects force us to make every database for every show exactly the same -- unless we modify the Value Objects for each individual show and re-compile a separate .SWF file for that show... If there were a way to write, say, an .XML file that the program could read and modify itself accordingly for each show, that would be brilliant. Is there a way to do that? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Best way to implement WebService Resend functionality?
@Amy: I sort of found out why I was having issue in assigning the token. For some reasons that I still don't know, the ws resend is always failing due to Parameter-fault message, which is weird because I put all the same arguments that I passed in on the 1st ws call. Hmmm --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, handitan handi.tan@ wrote: Hi all, I need some advices on how-to solve the issue that I am having. On my Flex application, I have a singleton class that contains 1 WebService instance which serves every services. It has been working fine but I miss-out a very important issue that I should have think of beforehand which is being able to resend the service again that was failed either due to a TimeOut or the infamous 2032 On the web, I found an example that I think it put me on the right track: http://flexmonkeypatches.com/flex-webservice-with-auto-repeat-and-increasing-timeout/ It's a good solution but I just need to investigate more on how-to incorporate this to my singleton class because: 1) On each service call, I save lots of infos on the AsyncToken such as resultHandler, faultHandler, etc. 2) On that example, resending the service call by doing op.send(args). I don't know yet on how-to copy over all saved infos from the previous service-call's token into this new one. The token should have the Responder still attached. I think you can probably just grab it and put it into the new token. HTH; Amy
[flexcoders] Re: Best way to implement WebService Resend functionality?
@Peeyush: Thanks for the suggestion, Peeyush. That's an interesting design. Hmmm...definitely will consider that one. --- In flexcoders@yahoogroups.com, Peeyush Tuli peeyus...@... wrote: An elegant design pattern would be to implement a request queue. All the requests that your webservice needs to send should be put in a queue. This queue can be a collection.Each item of this collection should have the following properties - -Request data -Operation/Webmethod Name -Function pointer to call in case of successful call(this is optional depending upon where you process your results) -unique identifier like an incremented counter - flag which says response awaited In the singleton class you can implement a timer based functionality which will poll the queue at regular intervals and pick up the item from this queue and call the required operation. You can attach the unique id to an asynctoken returned from the send operation. Once the result is received, you can remove it from the queue. If its a fault,you can either place it last or send it again depending on how you intend to implement it. Hope this helps... On Sat, Feb 20, 2010 at 4:48 AM, handitan handi@... wrote: Hi all, I need some advices on how-to solve the issue that I am having. On my Flex application, I have a singleton class that contains 1 WebService instance which serves every services. It has been working fine but I miss-out a very important issue that I should have think of beforehand which is being able to resend the service again that was failed either due to a TimeOut or the infamous 2032 On the web, I found an example that I think it put me on the right track: http://flexmonkeypatches.com/flex-webservice-with-auto-repeat-and-increasing-timeout/ It's a good solution but I just need to investigate more on how-to incorporate this to my singleton class because: 1) On each service call, I save lots of infos on the AsyncToken such as resultHandler, faultHandler, etc. 2) On that example, resending the service call by doing op.send(args). I don't know yet on how-to copy over all saved infos from the previous service-call's token into this new one. That's the approach that I am taking right now. But I am open to any suggestion. Thanks!
Re: [flexcoders] Re: Searching through an ArrayCollection of Objects
Thanks for the replies... How can I find out what's going on behind the scenes with IViewCursors or ListCollectionViews? Do they actually index the Collection data to make the filter super fast or do you think it's comparable if I'm just looping and searching using a brute comparison? I only need to find the first match but I'm looping the ArrayCollection of Objects about 50 times as I'm using it as a kind of Lookup Table. Perhaps I should implement a specific Class to cache/index the Collection to make the lookups quicker. M. Or perhaps I'm over complicating this :-) Cheers, Nick On 2 March 2010 19:51, Amy amyblankens...@bellsouth.net wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Krunal Panchal panchal_...@... wrote: Hi, You have to create the copy of ArrayCollection using the Utility.Copy command which we help you to keep the copy of original one and create the copy of existing one. Apply the filter condition on newly created ArrayCollection. You can just use a separate ListCollectionView that looks at the same source. No need to make a copy :)
[flexcoders] Re: Dynamically create a Value Object...
We're using an SQL database with a ColdFusion intermediary between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks, L. --- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote: Hi Laurence, I'm pretty new to Flex so there might be reasons to stick with Value Objects that I'm unaware of but you can definitely read and write XML and generate forms, layouts, etc on the fly based on the XML contents. I've used E4X to query XML data that I've sucked in from an HTTP call, modified the XML using E4X and pinged it back up to the HTTP server to save the XML data for later use. Hope that helps... Cheers, Nick -- http://blog.middleweek.co.uk/ On 2 March 2010 19:19, Laurence lmacne...@... wrote: The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra fields in it, which most clients don't need? As it stands right now, the Value Objects force us to make every database for every show exactly the same -- unless we modify the Value Objects for each individual show and re-compile a separate .SWF file for that show... If there were a way to write, say, an .XML file that the program could read and modify itself accordingly for each show, that would be brilliant. Is there a way to do that? Thanks, Laurence MacNeill Mableton, Georgia, USA
Re: [flexcoders] Re: Dynamically create a Value Object...
You could probably try having a base VO for all the properties that you know will be there and include a single property in the VO which would be either a Dictionary or a generic object used as an associative array to handle all your custom properties. Then just populate the VO like you normally would and when it comes to extra properties, throw them in that one extra VO property. You'd have to have some kind of parsing method on both ends but I'd think this would work without too much trouble. -Jake On Tue, Mar 2, 2010 at 3:21 PM, Laurence lmacne...@comcast.net wrote: We're using an SQL database with a ColdFusion intermediary between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks, L. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek n...@... wrote: Hi Laurence, I'm pretty new to Flex so there might be reasons to stick with Value Objects that I'm unaware of but you can definitely read and write XML and generate forms, layouts, etc on the fly based on the XML contents. I've used E4X to query XML data that I've sucked in from an HTTP call, modified the XML using E4X and pinged it back up to the HTTP server to save the XML data for later use. Hope that helps... Cheers, Nick -- http://blog.middleweek.co.uk/ On 2 March 2010 19:19, Laurence lmacne...@... wrote: The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra fields in it, which most clients don't need? As it stands right now, the Value Objects force us to make every database for every show exactly the same -- unless we modify the Value Objects for each individual show and re-compile a separate .SWF file for that show... If there were a way to write, say, an .XML file that the program could read and modify itself accordingly for each show, that would be brilliant. Is there a way to do that? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Flex drawing question
Would it be a smaller file and quicker load if instead of using graphics (png, jpg, gif) I used the flash drawing API (via Degrafa) to create the graphics of my web site?
[flexcoders] 3-month Flex contract
Hi all, A client of mine is looking for a consultant to help out on a new project. Description is below, if anyone is interested. Regards, Derek Monson Ascent Consulting,Inc. 57 Wingate Street, Suite 302 Haverhill, MA 01835 p. 978-372-3755 ext. 201 c. 603-401-4316 f. 815-377-3861 d...@employmentconsulting.com We are seeking a very experienced Adobe Flex consultant (3 months) to do some custom web user interface development work, and to act as a technical resource for a team with about 3 to 6 months of Flex experience. The work is primarily in the view layer of a model/view/controller (MVC) architecture, would be done on-site, and the person would participate fully as a team member of an agile/scrum team. Specific skills required include: · 2 years of Flex development experience working on real-world applications · Significant experience creating custom components using item renderers, item editors, styles, and skins · Familiarity with implementing custom/advanced layouts within Flex · Knowledge and experience using a Flex MVC framework, ideally Cairngorm · Understanding and experience with the existing Flex components and containers · Experience developing using Flex modules
[flexcoders] Trouble with ProgressBar and manual updates.
Using Flex3 in AIR standalone application. I have a ton of children I need to add to a Canvas dynamically. When I do this, it takes a long time. So I wanted to display a loading bar to the user. I create a Timer, and every time the timer ticks, I update the loadingBar and I add the child. I also update a textField with the loading progress as a debug tool. What I find is that the textField _always_ updates correctly in realtime, but USUALLY the progress bar does NOT update at all until the entire sequence is finished. If I make the tick time long enough, then the progress bar works, but this time seems very dependent on performance of the individual machine. My question is, how do I know what the lowest possible tick time I can use to make the progress bar update correctly is? Why does it work with the Text field just fine? Or is there a better pattern I could be using to do this correctly? As you can see from the code, I tried some things like updateAfterEvent and invalidateDisplayList to see if I could get it to update faster, but those did not work (unless I set the tick time high). code here: private var pendingElementsToAdd:Array; private var totalElementstoAdd:int; private static const TIME_BETWEEN_ADDS:Number = 20; private function addElements(newElements:Array):void { this.pendingElementsToAdd = newElements; this.totalElementstoAdd = this.pendingElementsToAdd.length; var newEventTimer:Timer = new Timer(TIME_BETWEEN_ADDS, newElements.length); newEventTimer.addEventListener(TimerEvent.TIMER, onTimerAddNewElement); newEventTimer.addEventListener(TimerEvent.TIMER_COMPLETE, finishAddingElements); newEventTimer.start(); } private function onTimerAddNewElement(event:TimerEvent):void { this.loadingBar.setProgress(this.totalElementstoAdd - this.pendingElementsToAdd.length, this.totalElementstoAdd); this.loadingText.text = Elements To Load: + this.pendingElementsToAdd.length; event.updateAfterEvent(); this.loadingBar.invalidateDisplayList(); this.addChild(this.pendingElementsToAdd.pop()); }
[flexcoders] Problem with VideoDisplay orizzontal reflection
Hello everyone, I write because I have a problem with the item VideoDisplay in Flex. A hypothetical mx:VideoDisplay id=videoDisplay width=400 height=300 / how do I reflect it horizontally? So basically the right side should become the left and the right the left. I tried to input a negative width but the app crashes. Can you help me? Thanks
[flexcoders] Java.net and now FLEX Rescue Mission on March 5th
Hi Folks, For those who didn't followed Sonatype blog, this Friday (March 5th) Sonatype will be organizing an major effort to migrate projects hosted Java.net maven repository to maven central. http://www.sonatype.com/people/2010/02/java-net-maven-repository-rescue-mission-on-march-5th/ We would like to extends this invitation to Flex projects. So if you run an open source Flex project and wanna see it hosted inside Maven Central Repository, that is your major opportunity. On March 5th, 2010 Juven Xu and Marvin Froeder from Sonatype will start servicing any and all requests from Java.net projects to migrate their Maven Repository infrastructure over to our hosted Nexus OSS instancehttp://oss.sonatype.org/. We will, of course, continue to service requests after March 5th, but March 5th will be set aside to specifically help Java.net projects get switched over and tested. You will also find Juven and I on IRC during the entire day. irc.codehaus.org #mavencentral Projects that use ant, but wanna go to maven central and make Flex/Maven developers happier can also join on this guest. See you on Friday. VELO
[flexcoders] Re: Dynamically create a Value Object...
Thanks for the suggestion... I may be able to make that work... If I understand you correctly, I'd need to return an array-within-an-array kind of thing... My normal array of VOs, with one property of each VO being an array itself... Sounds easy enough... But I've tried before to get CF to do that (for a different problem), and failed... Does anyone know how to get CF to return an array-within-an-array kind of structure? I kept getting weird errors the last time I tried something like that - it kept acting like I was trying to create a two-dimensional array, when I only wanted a 1-dimensional array nested within another 1-dimensional array... So obviously I was doing something wrong there... Any suggestions are appreciated - thanks, L. --- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote: You could probably try having a base VO for all the properties that you know will be there and include a single property in the VO which would be either a Dictionary or a generic object used as an associative array to handle all your custom properties. Then just populate the VO like you normally would and when it comes to extra properties, throw them in that one extra VO property. You'd have to have some kind of parsing method on both ends but I'd think this would work without too much trouble. -Jake On Tue, Mar 2, 2010 at 3:21 PM, Laurence lmacne...@... wrote: We're using an SQL database with a ColdFusion intermediary between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks, L. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek nick@ wrote: Hi Laurence, I'm pretty new to Flex so there might be reasons to stick with Value Objects that I'm unaware of but you can definitely read and write XML and generate forms, layouts, etc on the fly based on the XML contents. I've used E4X to query XML data that I've sucked in from an HTTP call, modified the XML using E4X and pinged it back up to the HTTP server to save the XML data for later use. Hope that helps... Cheers, Nick -- http://blog.middleweek.co.uk/ On 2 March 2010 19:19, Laurence LMacNeill@ wrote: The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra fields in it, which most clients don't need? As it stands right now, the Value Objects force us to make every database for every show exactly the same -- unless we modify the Value Objects for each individual show and re-compile a separate .SWF file for that show... If there were a way to write, say, an .XML file that the program could read and modify itself accordingly for each show, that would be brilliant. Is there a way to do that? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Checkbox set disabled color to enabled color.
Any ideas? --- In flexcoders@yahoogroups.com, aceoohay pa...@... wrote: I realized a couple of things I might be doing wrong and tried the following without a positive result; public function ValidatedCheckBox() { super(); this.addEventListener(Event.CHANGE,_eventHandler) var objUpSkin:Object = this.getStyle(upSkin); this.setStyle(disabledSkin,objUpSkin); var objUpIcon:Object = this.getStyle(upIcon); this.setStyle(disabledIcon,objUpIcon); var objSelectedUpSkin:Object = this.getStyle(selectedUpSkin); this.setStyle(selectedDisabledSkin,objSelectedUpSkin); var objSelectedUpIcon:Object = this.getStyle(selectedUpIcon); this.setStyle(selectedDisabledIcon,objSelectedUpIcon); } The reason I want to capture the existing enabled colors, etc. is that I allow run time skinning, and I want to get the current values of the enabled state to use for the disabled state. Paul --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote: I would like to set the disabled color to the enabled color on a checkbox based custom component. I tried; public function ValidatedCheckBox() { super(); this.addEventListener(Event.CHANGE,_eventHandler) var objEnabledColor:Object = this.getStyle(enabledColor); this.setStyle(disabledColor,objEnabledColor); } It did not work. How do I do this? Paul
[flexcoders] Re: Checkbox set disabled color to enabled color.
How about... public function ValidatedCheckBox() { super(); this.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete); } public function handleCreationComplete(pEvent :FlexEvent) :void { this.removeEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete); this.setStyle( disabledColor , this.getStyle(color) ); } Panhathai
[flexcoders] Re: Dynamically create a Value Object...
First, let me say that I have been roundly criticized for taking the approach of NOT using VOs. Second, I use .NET FluorineFX. Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements. If one were clever, using the approach above, one could create a Flex app that requests a table structure from the DB, and builds a data entry screen on the fly. You may want a schema table that contains data validation type info that would be read in conjunction with the table structure to allow edits to be performed by flex. When complete, all you would need to do is modify the DB to create the table structure the customer needs, and add records to the schema table, and you have a new data entry module. By the way, my main reason for resisting the VO structure, is I thought that keeping multiple copies of the VO in sync would be a PITA. Anytime you modified a table you need to modify at least two VOs, and potentially recompile middle tier and presentation layer programs. Paul --- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote: You could probably try having a base VO for all the properties that you know will be there and include a single property in the VO which would be either a Dictionary or a generic object used as an associative array to handle all your custom properties. Then just populate the VO like you normally would and when it comes to extra properties, throw them in that one extra VO property. You'd have to have some kind of parsing method on both ends but I'd think this would work without too much trouble. -Jake On Tue, Mar 2, 2010 at 3:21 PM, Laurence lmacne...@... wrote: We're using an SQL database with a ColdFusion intermediary between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks, L. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek nick@ wrote: Hi Laurence, I'm pretty new to Flex so there might be reasons to stick with Value Objects that I'm unaware of but you can definitely read and write XML and generate forms, layouts, etc on the fly based on the XML contents. I've used E4X to query XML data that I've sucked in from an HTTP call, modified the XML using E4X and pinged it back up to the HTTP server to save the XML data for later use. Hope that helps... Cheers, Nick -- http://blog.middleweek.co.uk/ On 2 March 2010 19:19, Laurence LMacNeill@ wrote: The program that I'm working on is for a company that does registrations for conventions and trade-shows. Different clients want different information stored for each show. Most of the information is the same from show-to-show, but every show has certain customizations that need to be done. The way they're doing it now is by going into the source code of their program and modifying it that way. We could do the same thing with our Flex app, but I'm trying like heck to avoid that... The problem I'm running into is the Flex Value Objects -- they pretty much have to be compiled into the .SWF file, which means we're stuck modifying source-code and re-compiling for each individual show. Not the solution we want. Is there a way to dynamically create and/or modify Value Objects so they can be changed without re-compiling the .SWF file? So that if a particular client wants stuff tracked that a different client doesn't want tracked, we don't have to create a generic version of our database that has all these extra
[flexcoders] Re: Best way to implement WebService Resend functionality?
--- In flexcoders@yahoogroups.com, handitan handi@... wrote: @Amy: I sort of found out why I was having issue in assigning the token. For some reasons that I still don't know, the ws resend is always failing due to Parameter-fault message, which is weird because I put all the same arguments that I passed in on the 1st ws call. Have you tried using Charles to see what messages are being sent back and forth? -Amy
Re: [flexcoders] Context Menu
Hi, Try this link.. :) http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid-control/ --- On Tue, 2/3/10, Angelo Anolin angelo_ano...@yahoo.com wrote: From: Angelo Anolin angelo_ano...@yahoo.com Subject: [flexcoders] Context Menu To: flexcoders@yahoogroups.com Date: Tuesday, 2 March, 2010, 1:31 AM Hi FlexCoders, Has anyone implemented a right mouse click context menu which contains sub-menu items? I have been able to create a datagrid control with right mouse menu and the context menu I have defined appears, but I have no idea on how to implement one which contains sub-menu. Any help/inputs would be appreciated. Thanks. Regards, Angelo Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
RE: [flexcoders] Where can I find a lot of Flex 3 AS3 examples?? Code that from other people?
Got me again on that one! And I was truly thinking at the time, and dont forget google Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Igor Costa Sent: Sunday, February 28, 2010 10:59 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Where can I find a lot of Flex 3 AS3 examples?? Code that from other people? Try this. http://tinyurl. http://tinyurl.com/ya6ofba com/ya6ofba Igor Costa 2010/2/28 Csomák Gábor csom...@gmail. mailto:csom...@gmail.com com did you try 'tour de flex'? http://www.adobe. http://www.adobe.com/devnet/flex/tourdeflex/ com/devnet/flex/tourdeflex/ 2010/2/28 fred44455 fred44...@yahoo. mailto:fred44...@yahoo.com com I am trying to learn Flex 3 AS3 but I need a lot of examples where can I find this?? I need real examples maybe from real sites or books or even source code in Flex that I could purchase. Thanks for your time. -- before printing, think about enviromental responsibility
Re: [flexcoders] Re: Dynamically create a Value Object...
*Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements.* I wouldnt recommend doing that ever from the presentation layer.. unless your middle tier has no chance of being exposed over the web and there is no smart and crazy user of your app who wants revenge :-) . There are tons of things achievable through SQL queries which we cant even imagine( it could format the hard drive). the kind of sql sanitization required over each such call would be too much. On Wed, Mar 3, 2010 at 9:54 AM, aceoohay pa...@compuace.com wrote: First, let me say that I have been roundly criticized for taking the approach of NOT using VOs. Second, I use .NET FluorineFX. Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements. If one were clever, using the approach above, one could create a Flex app that requests a table structure from the DB, and builds a data entry screen on the fly. You may want a schema table that contains data validation type info that would be read in conjunction with the table structure to allow edits to be performed by flex. When complete, all you would need to do is modify the DB to create the table structure the customer needs, and add records to the schema table, and you have a new data entry module. By the way, my main reason for resisting the VO structure, is I thought that keeping multiple copies of the VO in sync would be a PITA. Anytime you modified a table you need to modify at least two VOs, and potentially recompile middle tier and presentation layer programs. Paul --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake Churchill reyna...@... wrote: You could probably try having a base VO for all the properties that you know will be there and include a single property in the VO which would be either a Dictionary or a generic object used as an associative array to handle all your custom properties. Then just populate the VO like you normally would and when it comes to extra properties, throw them in that one extra VO property. You'd have to have some kind of parsing method on both ends but I'd think this would work without too much trouble. -Jake On Tue, Mar 2, 2010 at 3:21 PM, Laurence lmacne...@... wrote: We're using an SQL database with a ColdFusion intermediary between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks, L. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Nick Middleweek nick@ wrote: Hi Laurence, I'm pretty new to Flex so there might be reasons to stick with Value Objects that I'm unaware of but you can definitely read and write XML and generate forms, layouts, etc on the fly based on the XML contents. I've used E4X to query XML data that I've sucked in from an HTTP call, modified the XML using E4X and pinged it back up to the HTTP server to save the XML data for later use. Hope that helps... Cheers, Nick -- http://blog.middleweek.co.uk/ On 2 March 2010 19:19,
Re: Re[flexcoders] strict user input in TextInput
not sure.. but check if this helps http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetailextid=1049969 you might need to modify the original code.. ~Peeyush http://www.mds.asia On Tue, Mar 2, 2010 at 8:30 PM, sasuke uzumaki.naruto...@gmail.com wrote: Hi all. How would I achieve the task of restricting user input based on the current contents of the TextInput? I am aware of the restrictChars property but that doesn't help since it applies a blanket rule as to which characters are allowed/not allowed. An example here would be: allow the user to input a number with no more than a precision of 2. In this case, as soon as the user enters 12.34 any more keystrokes in the TextInput should become no-ops. I did try adding event listeners to the KeyboardEvent.UP_KEY and KeyboardEvent.DOWN_KEY but it seems that you can't stop the propagation or prevent the default of keyboard events. Any suggestions here would be very much appreciated. TIA, sasuke -- View this message in context: http://old.nabble.com/Restrict-user-input-in-TextInput-tp27756858p27756858.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] What type of backend Java technology Flex Developer should know?
i think a good point to start with how Flex and Java communicate. - Start with some samples of blazeds with flex. Blazeds is an open source java based infrastructure for flex and java communication from Adobe. - If you get hooked, try Merapi. That's how Java and Adobe AIR can communicate. On Tue, Mar 2, 2010 at 9:25 PM, fred44455 fred44...@yahoo.com wrote: More and more Java is required to know for any Flex Developer who is looking for a new project employment. My question is simple :Java is very waste so from your personal experience what type of Java Technology are they requiring(in general)?. Please don't elaborate or debate on why Java is required just post What type of Java they want us to know. Thanks for your time.
Re: [flexcoders] Trouble with ProgressBar and manual updates.
it might be that all the processing is too much to be displayed in the same frame. So this might help you http://jimmyflex.blogspot.com/2007/11/dont-forget-power-of-calllater.html ~Peeyush http://www.mds.asia http://jimmyflex.blogspot.com/2007/11/dont-forget-power-of-calllater.html On Wed, Mar 3, 2010 at 6:53 AM, Christopher McArthur cmcart...@riotgames.com wrote: Using Flex3 in AIR standalone application. I have a ton of children I need to add to a Canvas dynamically. When I do this, it takes a long time. So I wanted to display a loading bar to the user. I create a Timer, and every time the timer ticks, I update the loadingBar and I add the child. I also update a textField with the loading progress as a debug tool. What I find is that the textField _always_ updates correctly in realtime, but USUALLY the progress bar does NOT update at all until the entire sequence is finished. If I make the tick time long enough, then the progress bar works, but this time seems very dependent on performance of the individual machine. My question is, how do I know what the lowest possible tick time I can use to make the progress bar update correctly is? Why does it work with the Text field just fine? Or is there a better pattern I could be using to do this correctly? As you can see from the code, I tried some things like updateAfterEvent and invalidateDisplayList to see if I could get it to update faster, but those did not work (unless I set the tick time high). code here: *private* *var* pendingElementsToAdd:Array; *private* *var* totalElementstoAdd:int; *private* *static* *const* TIME_BETWEEN_ADDS:Number = 20; *private* *function* addElements(newElements:Array):*void* { * this*.pendingElementsToAdd = newElements; *this*.totalElementstoAdd = *this*.pendingElementsToAdd.length; var newEventTimer:Timer = *new* Timer(TIME_BETWEEN_ADDS, newElements.length); newEventTimer.addEventListener(TimerEvent.TIMER, onTimerAddNewElement); newEventTimer.addEventListener(TimerEvent.TIMER_COMPLETE, finishAddingElements); newEventTimer.start(); } *private* *function* onTimerAddNewElement(event:TimerEvent):*void* { *this*.loadingBar.setProgress(*this*.totalElementstoAdd - *this*.pendingElementsToAdd.length, *this*.totalElementstoAdd); *this*.loadingText.text = *Elements To Load: * + *this *.pendingElementsToAdd.length; event.updateAfterEvent(); *this*.loadingBar.invalidateDisplayList(); *this*.addChild(*this*.pendingElementsToAdd.pop()); }
[flexcoders] Re: Checkbox set disabled color to enabled color.
I tried; public function ValidatedCheckBox() { super(); this.addEventListener(Event.CHANGE,_eventHandler) this.addEventListener(FlexEvent.CREATION_COMPLETE, init); } public function init(event:FlexEvent):void { this.removeEventListener(FlexEvent.CREATION_COMPLETE, init) this.setStyle(disabledColor,this.getStyle(color)); this.setStyle(disabledIconColor,this.getStyle(iconColor)); } With no luck. Paul --- In flexcoders@yahoogroups.com, ppongtong ppongt...@... wrote: How about... public function ValidatedCheckBox() { super(); this.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete); } public function handleCreationComplete(pEvent :FlexEvent) :void { this.removeEventListener(FlexEvent.CREATION_COMPLETE, handleCreationComplete); this.setStyle( disabledColor , this.getStyle(color) ); } Panhathai
[flexcoders] Re: Dynamically create a Value Object...
See what I mean, I get criticized roundly. Of course I have security enabled, including passing constantly changing tokens (unique for each user for each login for each transaction) from the front end to the backend, that need to match. I suppose if there were a clever user that had lots of skills (my apps are intranet only) and their database user had the right privileges (I use DB security as well) perhaps they could wreak havoc. If I found that user, I would steal him/her away from the client where they are doing data entry and hire them to work for me. Paul --- In flexcoders@yahoogroups.com, Peeyush Tuli peeyus...@... wrote: *Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements.* I wouldnt recommend doing that ever from the presentation layer.. unless your middle tier has no chance of being exposed over the web and there is no smart and crazy user of your app who wants revenge :-) . There are tons of things achievable through SQL queries which we cant even imagine( it could format the hard drive). the kind of sql sanitization required over each such call would be too much. On Wed, Mar 3, 2010 at 9:54 AM, aceoohay pa...@... wrote: First, let me say that I have been roundly criticized for taking the approach of NOT using VOs. Second, I use .NET FluorineFX. Having said that, I created my applications in such a way that my middle tier has a few generic methods for querying, updating, inserting data from a DB (usually Oracle). There is also a generic middle tier routine to handle stored procedures as well. My presentation layer, Flex, builds a SQL statement, and passes it to the generic middle tier that processes it (generally just passes it to the DB), and returns to Flex either an array collection (fully typed), if it was a query, or the results of the non query sql statements. If one were clever, using the approach above, one could create a Flex app that requests a table structure from the DB, and builds a data entry screen on the fly. You may want a schema table that contains data validation type info that would be read in conjunction with the table structure to allow edits to be performed by flex. When complete, all you would need to do is modify the DB to create the table structure the customer needs, and add records to the schema table, and you have a new data entry module. By the way, my main reason for resisting the VO structure, is I thought that keeping multiple copies of the VO in sync would be a PITA. Anytime you modified a table you need to modify at least two VOs, and potentially recompile middle tier and presentation layer programs. Paul --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake Churchill reynacho@ wrote: You could probably try having a base VO for all the properties that you know will be there and include a single property in the VO which would be either a Dictionary or a generic object used as an associative array to handle all your custom properties. Then just populate the VO like you normally would and when it comes to extra properties, throw them in that one extra VO property. You'd have to have some kind of parsing method on both ends but I'd think this would work without too much trouble. -Jake On Tue, Mar 2, 2010 at 3:21 PM, Laurence LMacNeill@ wrote: We're using an SQL database with a ColdFusion intermediary between the Flex app and the database... I've used XML files to configure a couple of the components -- give the user the option to change the layout of a component, for example, by modifying the contents of a config.xml file, that sort of thing... But I don't see us replacing our database with a bunch of XML files... (Or maybe I completely misunderstood your reply, which is quite possible...) I was hoping that there might be a way to get the program to modify its VOs by reading from an XML file what fields I want the VO to store... But honestly, I don't care where that info is stored... I just need to figure out how to dynamically modify a VO (and have ColdFusion realize that the VO has been changed by the Flex app) so I can deal with databases that have had fields added or changed without having to re-compile the entire program every time... And then, of course, how to reference these dynamically-modified VOs in my program. Thanks,
Re: Re[flexcoders] strict user input in TextInput
I’d call preventDefault() on the textInput event. On 3/2/10 9:48 PM, Peeyush Tuli peeyus...@gmail.com wrote: not sure.. but check if this helps http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetailextid=1049969 you might need to modify the original code.. ~Peeyush http://www.mds.asia On Tue, Mar 2, 2010 at 8:30 PM, sasuke uzumaki.naruto.is http://uzumaki.naruto.is @gmail.com http://gmail.com wrote: Hi all. How would I achieve the task of restricting user input based on the current contents of the TextInput? I am aware of the restrictChars property but that doesn't help since it applies a blanket rule as to which characters are allowed/not allowed. An example here would be: allow the user to input a number with no more than a precision of 2. In this case, as soon as the user enters 12.34 any more keystrokes in the TextInput should become no-ops. I did try adding event listeners to the KeyboardEvent.UP_KEY and KeyboardEvent.DOWN_KEY but it seems that you can't stop the propagation or prevent the default of keyboard events. Any suggestions here would be very much appreciated. TIA, sasuke -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui