Re: [flexcoders] Detecing AIR Network Timeout - Best Practices
You've got an example in Tour de Flex named detecting user presence, it is place in the menu AIR capabilities coding technique. I don't know if it will serve you but when i read your message i remember this demo. Alban Battershall, Jeff a écrit : In the AIR app I’m building, if the user leaves the app running for without interaction, the network times out and the user gets ChannelCall.Failed error when they next attempt to interact with the application. What’s the best way to listen for a timeout? On the ChannelSet? Or to keep the network connection alive by periodic requests? Jeff Battershall
[flexcoders] Actionscript Questions
I come from a C++ background and was wondering if anyone knew the following: Does Actionscript have the equivalent of the enum operator where I can define my own variable types for ease of coding? Does Actionscript support overloaded constructors?
[flexcoders] Loading oversized images in AS3
Hi, I try to load a image file (.jpg) in my Air application. The image resolution in much larger than the maximum value of 16 mega pixel. I know that in AS3 I cannot handle this. My problem is: How to act on such a problem - no error is thrown and it has nothing to do with the filesize. My code: var f:File=_list[0] as File; var imageLoader:Loader = new Loader(); imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoadImage); imageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onErrorLoadingImage); imageLoader.load(new URLRequest(f.url)); There will be no IOError or complete event if the resolution of the image in larger than 16 MPixel. Can anyone help me out?? Thanks in advance. CFE
[flexcoders] Re: Actionscript Questions
Actionscript 3 does not support either of these constructs natively. However, there are ways to implement them. These links should give you some insight: http://blog.petermolgaard.com/2008/11/02/actionscript-3-enums/ http://flexblog.faratasystems.com/?p=100 This is also a good insight into Actionscript 3 for C++ programmers: http://blogs.adobe.com/kiwi/2006/05/as3_language_101_for_cc_coders_1.html HTH Steve --- In flexcoders@yahoogroups.com, SvenM smy...@... wrote: I come from a C++ background and was wondering if anyone knew the following: Does Actionscript have the equivalent of the enum operator where I can define my own variable types for ease of coding? Does Actionscript support overloaded constructors?
RE: [flexcoders] Detecing AIR Network Timeout - Best Practices
Thanks Alban, That would work from a 'brute force' type of approach, but doesn't address the scenario of the user interacting with an app but not making network calls, and then encountering an exception when they attempt a network call and the network has timed out. You could conceivably keep the network connection alive by periodic calls to the back end, but then you're using resources without need. I'd prefer to close the app when the network times out. Just a question of what event to listen to. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of b_productiv2000 Sent: Wednesday, September 23, 2009 3:50 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Detecing AIR Network Timeout - Best Practices You've got an example in Tour de Flex named detecting user presence, it is place in the menu AIR capabilities coding technique. I don't know if it will serve you but when i read your message i remember this demo. Alban Battershall, Jeff a écrit : In the AIR app I'm building, if the user leaves the app running for without interaction, the network times out and the user gets ChannelCall.Failed error when they next attempt to interact with the application. What's the best way to listen for a timeout? On the ChannelSet? Or to keep the network connection alive by periodic requests? Jeff Battershall -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Detecing AIR Network Timeout - Best Practices
We use an error handler on the Operation and then resend up to 3 times before raising a hard fail. --- In flexcoders@yahoogroups.com, Battershall, Jeff jeff.battersh...@... wrote: Thanks Alban, That would work from a 'brute force' type of approach, but doesn't address the scenario of the user interacting with an app but not making network calls, and then encountering an exception when they attempt a network call and the network has timed out. You could conceivably keep the network connection alive by periodic calls to the back end, but then you're using resources without need. I'd prefer to close the app when the network times out. Just a question of what event to listen to. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of b_productiv2000 Sent: Wednesday, September 23, 2009 3:50 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Detecing AIR Network Timeout - Best Practices You've got an example in Tour de Flex named detecting user presence, it is place in the menu AIR capabilities coding technique. I don't know if it will serve you but when i read your message i remember this demo. Alban Battershall, Jeff a écrit : In the AIR app I'm building, if the user leaves the app running for without interaction, the network times out and the user gets ChannelCall.Failed error when they next attempt to interact with the application. What's the best way to listen for a timeout? On the ChannelSet? Or to keep the network connection alive by periodic requests? Jeff Battershall -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
RE: [flexcoders] Re: Detecing AIR Network Timeout - Best Practices
Well I'm not sure that's going to work in my implementation. I'm using Cairngorm and my ServiceLocator is holding my RemoteObject instances. I'm assuming that's what's timing out. I suppose I could refresh the RO in question and re-try the call, but I'm understanding of the architecture is not complete - not sure if that's going to cut it either. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of reflexactions Sent: Wednesday, September 23, 2009 10:08 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Detecing AIR Network Timeout - Best Practices We use an error handler on the Operation and then resend up to 3 times before raising a hard fail. --- In flexcoders@yahoogroups.com, Battershall, Jeff jeff.battersh...@... wrote: Thanks Alban, That would work from a 'brute force' type of approach, but doesn't address the scenario of the user interacting with an app but not making network calls, and then encountering an exception when they attempt a network call and the network has timed out. You could conceivably keep the network connection alive by periodic calls to the back end, but then you're using resources without need. I'd prefer to close the app when the network times out. Just a question of what event to listen to. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of b_productiv2000 Sent: Wednesday, September 23, 2009 3:50 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Detecing AIR Network Timeout - Best Practices You've got an example in Tour de Flex named detecting user presence, it is place in the menu AIR capabilities coding technique. I don't know if it will serve you but when i read your message i remember this demo. Alban Battershall, Jeff a écrit : In the AIR app I'm building, if the user leaves the app running for without interaction, the network times out and the user gets ChannelCall.Failed error when they next attempt to interact with the application. What's the best way to listen for a timeout? On the ChannelSet? Or to keep the network connection alive by periodic requests? Jeff Battershall -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Executing commands to other programs?
In Flex, how can I have the program execute something through a terminal? Basically, I want to fire up a Java application to run some tasks taking parameters generate by the Flex app. Any advice? I'd imagine it's something simple, but I'm not sure what to search for to find this.
[flexcoders] Re: Executing commands to other programs?
If you are using AIR, you can use Merapi (http://www.merapiproject.net/) --- In flexcoders@yahoogroups.com, agaboogaboo agabooga...@... wrote: In Flex, how can I have the program execute something through a terminal? Basically, I want to fire up a Java application to run some tasks taking parameters generate by the Flex app. Any advice? I'd imagine it's something simple, but I'm not sure what to search for to find this.
[flexcoders] DataGrid ItemEditor help
Hi All, I've been working with DataGrid itemEditors with a custom checkbox column. It's been challenging, to say the least. I'm at the point where I'm getting ready to scrap the itemEditor infrastructure and just code itemRenderers that can display edit components. It might be easier. I'm hoping some of you will have random tidbits around the web that I can read, or suggested workarounds. 1st issue) When I check a checkbox on the row, I'm wishing for all the ItemEditors on that row to show in edit mode. 2) When user checks a checkbox, I want to set data values on the item editors to default values. 3) When rendering the screen and loading up items that were selected before (via checkbox), I want to set the item editors to contain the default bound data. 4) When unchecking a checkbox in the row, I wish to remove all set values. I'm using a variation of Alex H's CheckBoxDataGrid with CheckBoxItemRenderer for the checkbox portion of the row. I've judiciously used a lot of the itemEditor events, like itemEditBegining, etc... But I'm still having all sorts of state problems and annoying inconsistencies. Should I bail on itemEditors and just write a custom fancy itemRenderer that can display edit fields at my whim? Are there any good tutorials out there for doing fancy bindings with ItemEditors? (I've read through all the docs at the adobe site.) Thanks
[flexcoders] Re: Executing commands to other programs?
That would work, but I also need to execute some python scripts to activate some external hardware. Ideally, I can just make flex execute command line functions and that would be the easiest - otherwise maybe I can use Merapi and have Flex/Air execute a Java app, which executes the Python script. That isn't a clean solution, but if I have to, that's what I'll do. Any more thoughts? --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: If you are using AIR, you can use Merapi (http://www.merapiproject.net/) --- In flexcoders@yahoogroups.com, agaboogaboo agaboogaboo@ wrote: In Flex, how can I have the program execute something through a terminal? Basically, I want to fire up a Java application to run some tasks taking parameters generate by the Flex app. Any advice? I'd imagine it's something simple, but I'm not sure what to search for to find this.
RE: [flexcoders] DataGrid ItemEditor help
The DG only supports one popup editor at a time. I think you will have to have the other renderers change their look and set rendererIsEditor on them. 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 taude1 Sent: Wednesday, September 23, 2009 8:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid ItemEditor help Hi All, I've been working with DataGrid itemEditors with a custom checkbox column. It's been challenging, to say the least. I'm at the point where I'm getting ready to scrap the itemEditor infrastructure and just code itemRenderers that can display edit components. It might be easier. I'm hoping some of you will have random tidbits around the web that I can read, or suggested workarounds. 1st issue) When I check a checkbox on the row, I'm wishing for all the ItemEditors on that row to show in edit mode. 2) When user checks a checkbox, I want to set data values on the item editors to default values. 3) When rendering the screen and loading up items that were selected before (via checkbox), I want to set the item editors to contain the default bound data. 4) When unchecking a checkbox in the row, I wish to remove all set values. I'm using a variation of Alex H's CheckBoxDataGrid with CheckBoxItemRenderer for the checkbox portion of the row. I've judiciously used a lot of the itemEditor events, like itemEditBegining, etc... But I'm still having all sorts of state problems and annoying inconsistencies. Should I bail on itemEditors and just write a custom fancy itemRenderer that can display edit fields at my whim? Are there any good tutorials out there for doing fancy bindings with ItemEditors? (I've read through all the docs at the adobe site.) Thanks
[flexcoders] Re: AS3 URLRequest issue
That's exactly what it was, I needed to escape my flashvar. Thanks!
RE: [flexcoders] SDK 3.2 upgrade to 3.4 issue
Thanks for the info. I was just upgrading to stay current, no particular reason so I'll hang back on 3.3 for a while until 3.5 is released. Jake Churchill CF Webtools 11204 Davenport, Ste. 100 Omaha, NE 68154 http://www.cfwebtools.com 402-408-3733 x103 -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jim Cheng Sent: Tuesday, September 22, 2009 5:14 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] SDK 3.2 upgrade to 3.4 issue Yup, something did change for the worse in 3.4 in a show-stopping way. There's a relatively easy workaround for this, just add your own listeners to HTTPService directly and those will only get called once (as opposed to the responder). Try the 3.x branch on opensource.adobe.com if you've brave, or stick with 3.3 for the time being if you can afford to wait for them to roll out the next official build. Here's the bug: http://bugs.adobe.com/jira/browse/SDK-22883 Jim Cheng EffectiveUI Jake Churchill wrote: I just installed the 3.4 SDK (previously was using 3.2). I have a project which uses Cairngorm. I switch the project to the new compiler version and re-build without any errors. However, whenever I run the project, all my events get dispatched once (I'm breaking the code all over to verify) but the result handler in the commands get hit twice. Did something change regarding event dispatching, AsyncTokens, etc that would cause this? FYI, switching back to 3.2 and re-building makes the code run just fine again. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62 079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Executing commands to other programs?
Perhaps you could install Apache and mod_python and use pyAMF to send data via AMF. I don't know Python but I would assume you could then execute a Java app from Python. --- In flexcoders@yahoogroups.com, agaboogaboo agabooga...@... wrote: That would work, but I also need to execute some python scripts to activate some external hardware. Ideally, I can just make flex execute command line functions and that would be the easiest - otherwise maybe I can use Merapi and have Flex/Air execute a Java app, which executes the Python script. That isn't a clean solution, but if I have to, that's what I'll do. Any more thoughts? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: If you are using AIR, you can use Merapi (http://www.merapiproject.net/) --- In flexcoders@yahoogroups.com, agaboogaboo agaboogaboo@ wrote: In Flex, how can I have the program execute something through a terminal? Basically, I want to fire up a Java application to run some tasks taking parameters generate by the Flex app. Any advice? I'd imagine it's something simple, but I'm not sure what to search for to find this.
[flexcoders] camera function question?
Hi, I wamt to use some camera functions to get Snapshot in Flex application. something like follows: camera = Camera.getCamera(); vd.attachCamera(camera); var bd:BitmapData = ImageSnapshot.captureBitmapData(vd); mx:VideoDisplay id=vd width=200 height=200 visible=false/ Do I have to need flash media server setup or not? May I use the functions if I do not have flash media server? Thanks for your help Mark
[flexcoders] Reference SPARK application
Hi, Is there any reference application out there using SPARK? Something more then a hello world and 2 skinned components =D VELO
[flexcoders] Potomac - Flex Modularity Framework (like OSGi / Eclipse RCP)
Hi flexcoders, I wanted to drop by and announce our new Flex framework. I've seen a few messages here over time where people are looking for a framework like the Eclipse RCP that includes a deep modular approach. We've just released on thats just for those applications. Potomac brings OSGI-like modularity to Flex. Check it out: http://www.potomacframework.org thanks, -Chris p.s. I know - not another Flex framework. But this one is different... really... I promise :)
[flexcoders] Re: modules vs. sub-applications
Hi Chris, You should check out our recently released modular framework for Flex: www.potomacframework.org -Chris --- In flexcoders@yahoogroups.com, Chris Sheffield cmsheffi...@... wrote: Hi all, I'm brand new to Flex. Well, maybe not brand new, but almost. I've been reading books and working on tutorials for a couple months now, but my company is just getting started on our first Flex project. I'm excited to be working with Flex. I'm realizing there is still a lot to learn. Here is my first big question. I think I'm asking for more of an opinion from other developers than anything, but I'm also curious to know if there is a best practice kind of answer. I've been reading through the Flex documentation and through other sources about using modules vs. sub-applications. I think I understand pretty well the difference between the two. The application we'll be creating will consist of multiple screens, or views, that school students will work their way through one screen at a time. Each screen, for the most part, is independent of another, but some screens are similar in that the student will perform similar activities on them. So there will probably be some screens that will need to share code. We would also like to make use of the same screens in such a way that someone in our company can test/verify certain pieces of content (for example, text, audio, pictures, etc), and see this content exactly as a student would see it by jumping directly to a specific screen. Hopefully I've provided enough information for someone to tell me, in your opinion, would it be best to use modules or sub-apps for the individual screens? I wasn't sure if it would even be possible to jump into a specific screen if it were a module. I think I'm leaning toward using sub-apps, but wondered if there are any major drawbacks. What about if sub-apps need to share classes, methods, properties, etc.? Looking forward to your responses. Thanks, Chris -- Chris Sheffield Read Naturally, Inc. www.readnaturally.com
[flexcoders] Re: login form
--- In flexcoders@yahoogroups.com, gurmeet.bali gurmeet.b...@... wrote: --- In flexcoders@yahoogroups.com, varsha.nadig varsha.nadig@ wrote: hi m designing a new application.. i have designed the login page, but i don't know how to go the welcome page after login page.. what should i do to open a new mxml doc from one mxml with a button click? Thier is no concept of pages in flex applications.It is all embeded in a single Application mxml.The only thing is showing/hiding different components or using the navigation controls provided by flex. thank u gurmeet.. but i hav no idea how to use the navigation controls.. can u please elaborate this
[flexcoders] Re: login form
Hi, We can navigate to another MXML, this is the simplest way which worked for me. 1. Create a instance of the userForm.MXML in the login page while on click of the button. 2.mx:Button label=Log in id=submitButton click=checkuser();/ 3. private function checkuser():void { var userform:UserForm = new UserForm(); var myCan:Canvas = new Canvas(); parentApplication.removeAllChildren(); myCan.addChild(userform); parentApplication.addChild(myCan); } This thing works for me, try it out. And if find any other best way do post it below. Gopi Shankar
Re: [flexcoders] modules vs. sub-applications
Alex, Thanks so much for the info. Good things to keep in mind. -- Chris Sheffield Read Naturally, Inc. www.readnaturally.com On Sep 22, 2009, at 3:28 PM, Alex Harui wrote: Hopefully you’ve read through the modules and marshall plan posts on my blog. Sub-apps can share code via RSLs. You can’t jump immediately to either a sub-app or module; it has to load first. You can build custom test harnesses for either. There are three main criteria: size, integration and security. Modules are generally smaller because they are optimized for a particular host. Sub-apps must carry their own weight because they are capable of running on their own. Modules sacrifice security for tight integration: they assume they have direct references to the host. Sub-applications can be written in a way that they don’t assume direct access to the main application and that allows you to sandbox the sub-app so it can’t do mean things. Sandboxing also allows the application to be written with a different version of Flex. However there are UI and performance limitations. If you own and will always own every line of code that runs, modules are going to be faster and smaller. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs.adobe.com/aharui
[flexcoders] Largest tomcat heapsize with LCDS
We are trying to figure out what the largest heapsize we can use with tomcat/LCDS is. We currently have it set to 2GB but would like to have more. Is anybody using a larger heapsize than that? If so, how much heap do you have and are you seeing any issues with very long GC's? Thanks. tj
Re: [flexcoders] SDK 3.2 upgrade to 3.4 issue
If you do hang back with 3.3 _AND_ are using Flex Builder's automatically generated HTML wrapper, you should be aware that there was a bug discovered in the express-install template files that can expose you to a cross-site-scripting (XSS) attack. Adobe fixed this in 3.4, but with that revision, also introduced the nasty bug with HTTPService responders getting called twice. If you are using the vanilla express-install templates to generate HTML for you, you might want to patch your 3.3 SDK while you wait for 3.5. Here's the relevant links: http://www.adobe.com/support/security/bulletins/apsb09-13.html http://kb2.adobe.com/cps/495/cpsid_49530.html Hope this helps, Jim Cheng EffectiveUI Jake Churchill wrote: Thanks for the info. I was just upgrading to stay current, no particular reason so I'll hang back on 3.3 for a while until 3.5 is released.
[flexcoders] Re: login form
I can give you a solution, but i am not sure this is the beat one out. mx:Button label=Register id=submit click=checkUser();/ 1. Create a instance of the MXML should be loaded like this in the checkuser() var userform:UserForm = new UserForm(); var myCan:Canvas = new Canvas(); parentApplication.removeAllChildren(); myCan.addChild(userform); parentApplication.addChild(myCan); Here the UserForm is the MXML to be loaded after clicking the button Register. Let me know the result after your try.
[flexcoders] e4x Filtering Success
(partially...) I was able to filter through e4x via mx:XML and the dataProvider as follows... mx:XML id=data source=sep.xml format=e4x/ mx:PieChart width=100% height=100% dataProvider={data.Location.(region == 'Asia' )} How can I add an additional filter argument from here? Using the technique gave me error that entity name must immediately follow I want to filter something like: region = Asia AND GDP/capita = 1 Thanks!
[flexcoders] scrollRect ???
Wondering if anyone knows how to get the difference between the scrollRect x position relative to the components edges? I am building a pancontrol, similar to the ones found Google Maps or Yahoo Maps, for quick navigation. In order to setup my pancontrol I need to find out the following given this code: Application... .. mx:Canvas id=compHolder width=100% height=100% horizontalScrollPolicy=off verticalScrollPolicy=off components:myComp id=vis width=100% height=100% horizontalScrollPolicy=off verticalScrollPolicy=off backgroundAlpha=0 scrollRect={rec} cacheAsBitmap=true mouseUp=handleVisMouseUp() / /mx:Canvas I need to find the distance or gap between the vis.scrollRect xy position relative to the vis xy position. My application width height are 600 x 600. Vis width and height are 3000 x 900 so they extend off screen. I am using the scrollRect to limit what is viewable. But in order build my pancontrol I need to find the diff between the X Y of the scrollRect in relation to the XY of the Vis. So how far off left, right, bottom, and top of the visible area does Vis extend. I need those numbers in pixels. TIA, J