[flexcoders] Re: Comparing Array and Object, not expected results
This happens because of implicit type conversion (in this case it's more than just type conversation but it makes sense here). notice that adding another element to array leads to Ok --- In flexcoders@yahoogroups.com, Marco Catunda marco.catu...@... wrote: Hi, Why the Alert method shows Crazy string at this code below? I really didn't fingure it out. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete(event) mx:Script ![CDATA[ import mx.controls.Alert; public function onCreationComplete(event: Event): void { var a: Array = new Array(); a.push( 2 ); var i: Object = 2; if( a == i ) { Alert.show( Crazy...!!! ); } else { Alert.show( Ok ); } } ]] /mx:Script /mx:Application
[flexcoders] Re: Write data to print stream
why not to use Printing API? --- In flexcoders@yahoogroups.com, Jackson [EMAIL PROTECTED] wrote: Hi , I am developing an AIR application.How can i write data to print stream(communicating to local printer /lpt)?... Thanks in advance. Abdul Jaleel C
[flexcoders] Re: palin text printing in flex without dialogue box.
No, it's not possible in Flex (security restriction) and I guess the same for Air, but I saw Air application that managed to programmatically click Print button using some external software (it was kiosk application) Regards --- In flexcoders@yahoogroups.com, Jackson [EMAIL PROTECTED] wrote: Hi All, Is it possible to print plain text in flex or adobe Air application?.And can we print without printer dialogue box?. Thanks in Advance.. Abdul Jaleel C.
[flexcoders] Re: New framework for Flex and AIR enterprise applications
It seems like a trend :) I've just posted my own framework that do the same stuff but consists of one public class only :) (dependecy injection, Spring-style AOP , asynchronous command chaining etc) Check it out http://code.google.com/p/ctx/ --- In flexcoders@yahoogroups.com, dev.apostiglioni [EMAIL PROTECTED] wrote: I'd like to share with all of you who develop enterprise applications this new framework: Aconcagua Flex http://code.google.com/p/aconcagua-flex/ (http://code.google.com/p/aconcagua-flex/). It's aim is to help in building enterprise Flex and AIR applications, and it has beeing designed to be: - Test friendly: Helps to build testeable applications. - Not intrusive. - IoC and dependency injection capabilities. - Stackable: It is not only an MVC framework. It's a layered framework, and you can use the layers that you want separately. - Extensible. - Flexible. - Performant. - Easy to understand: It does not re-invent the wheel. Nothing new if you already know Spring and Cairngorm or PureMVC. - Etc, etc. For those who use maven, it is also available at this repository: http://aconcagua-flex.googlecode.com/svn/repository/releases/ Of course, all feedback is wellcome :-)
[flexcoders] Re: How to Embed an Application that Supports Deep-Linking?
does your page (that one you're trying embed into) have any other flash movies? Regards, Andrii --- In flexcoders@yahoogroups.com, Alexander Baetz [EMAIL PROTECTED] wrote: Hi, for Training i developed an application that uses the Flex 3 Deeplinking-Mechanism. I used the Flex Builder and everything Works perfect when i open the html-file, the flex builder creates. Now i tried to embed the application into an existing page (for example www.mydomain.de/myapp.html . I placed the application at www.myotherdomain.de/testapp/ and started trying. Since i don't know much about JavaScript i tried the copy-paste-Approach. Copy the content of the generated html-file, fix all links, check all links, hope it works. Well, all links work, i hoped and it didn't. No action inside my app changes the url inside the browser. No parameters attached to the url in the prowser affect the application. My current Testembed is added as an attachment. Everything beside testapp_embed.txt was generated by the flex builder. How can (or should) i use a flex application from another domain and make deeplinking still work? I hope somebody out there can help me.
[flexcoders] Re: Memory issues ... garbage collection only running in IE (not FF or Safari)
i've tried your example and didn't notice any memory leakage. anyway, why do you need to create components and remove them, and create again the same components? It looks like you made up an artificial problem for yourself :) --- In flexcoders@yahoogroups.com, e_baggg [EMAIL PROTECTED] wrote: So I have an app in production which after 10 minutes of usage began to perform EXTREMELY slow, and users had to restart the app. (Flex 3) Windows and Mac...all browsers. I did some Profiling and did not get far. Whenever I take a Memory Snapshot, gc() is forced and all my objects are correctly removed from memory. So why are they not gc()'d in normal runtime?? I know gc() only runs when new memory is requested and nothing is being drawn/rendered. Both seem to be OK on my side. I have read extensively all the blogs and Adobe docs regarding this issue, including the event listener for ENTER_FRAME which calls System.gc() twice. (http://www.craftymind.com/2008/04/09/kick- starting-the-garbage-collector-in-actionscript-3-with-air/). This unfortunately did not work for me. To simplify, I created a simple app that adds and removes RichText fields. if I create 50 of them, then remove them all, then Add one back, that *should* force a gc() but it does not. The FF memory always stays high. I noticed in IE, minimizing the browser window causes a gc() and my memory drops to a much lower #. Has anyone seen or come across this? B/c of this issue, we're pretty much going to lose our customers and try to wing a html/ajax app ASAP..so I'm scrambling to resolve this. Thanks in advance for any help. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() layout=vertical mx:Script ![CDATA[ import mx.controls.RichTextEditor; private function removeit():void { this.removeChildAt(2); } private function doit():void { var rte : RichTextEditor = new RichTextEditor(); rte.width=300; rte.height=150; this.addChild(rte); } ]] /mx:Script mx:Button click=doit() label=Add/ mx:Button click=removeit() label=Remove/ /mx:Application
[flexcoders] Re: Memory issues ... garbage collection only running in IE (not FF or Safari)
i still think that you could re-use window instances. After all, how many windows a regular human being is capable to deal with at one time - 7, 12,25? You just create a pool of instances and there will be *zero* startup time for the window and *zero* memory increase. Otherwise, you would need to create unlimited number of instances. When I was a little boy and programmed in Borland Delphi, I came up with the same idea for my applications - and i think this approach is still valid for Flex stuff :) Flex components by design are not light. for example, they could be references in static variables (i guess), which could prevent some objects from garbage collecting. There are item renderers, they are designed to be numerous, but even they, they are cached by components like datagrid, list, etc. --- In flexcoders@yahoogroups.com, e_baggg [EMAIL PROTECTED] wrote: My original mxml was a bad example I guess. In my application, which is a Flex app that has its own windowing (exactly like Windows)...when I add and create Windows and close them, the browser CPU memory always increments (except for IE when I minimize the browswer window and memory is restored). When using System.totalMemory, I see some memory gets cleaned up but not all of it and if I open and close the same window multiple times, it is inconsistent to how much memory is given back to the Player, but either way it continually increments. I use weakReferences everywhere and call removeAllChildren() on the toplevel containers and set the viewComponent to null when removing the Mediator from the Facade (PureMvc). But yeah, when using Profiler, which forces a gc(), all memory is correctly restored back the player. Just not in runtime. The hunt continues... --- In flexcoders@yahoogroups.com, andrii_olefirenko andriyo@ wrote: i've tried your example and didn't notice any memory leakage. anyway, why do you need to create components and remove them, and create again the same components? It looks like you made up an artificial problem for yourself :) --- In flexcoders@yahoogroups.com, e_baggg e_baggg@ wrote: So I have an app in production which after 10 minutes of usage began to perform EXTREMELY slow, and users had to restart the app. (Flex 3) Windows and Mac...all browsers. I did some Profiling and did not get far. Whenever I take a Memory Snapshot, gc() is forced and all my objects are correctly removed from memory. So why are they not gc()'d in normal runtime?? I know gc() only runs when new memory is requested and nothing is being drawn/rendered. Both seem to be OK on my side. I have read extensively all the blogs and Adobe docs regarding this issue, including the event listener for ENTER_FRAME which calls System.gc() twice. (http://www.craftymind.com/2008/04/09/kick- starting-the-garbage-collector-in-actionscript-3-with-air/). This unfortunately did not work for me. To simplify, I created a simple app that adds and removes RichText fields. if I create 50 of them, then remove them all, then Add one back, that *should* force a gc() but it does not. The FF memory always stays high. I noticed in IE, minimizing the browser window causes a gc() and my memory drops to a much lower #. Has anyone seen or come across this? B/c of this issue, we're pretty much going to lose our customers and try to wing a html/ajax app ASAP..so I'm scrambling to resolve this. Thanks in advance for any help. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() layout=vertical mx:Script ![CDATA[ import mx.controls.RichTextEditor; private function removeit():void { this.removeChildAt(2); } private function doit():void { var rte : RichTextEditor = new RichTextEditor(); rte.width=300; rte.height=150; this.addChild(rte); } ]] /mx:Script mx:Button click=doit() label=Add/ mx:Button click=removeit() label=Remove/ /mx:Application
[flexcoders] Re: Equivalent to Java's Class.isInstance(Object) instance method?
obj is cls - it works for me, no compile error (Flex SDK 3). --- In flexcoders@yahoogroups.com, Mark Carter [EMAIL PROTECTED] wrote: I don't think that works when I have a variable of Class type. public static function isObjectInstanceOfClass(obj:Object, cls:Class):Boolean { return obj is cls; // compile error } florian.salihovic wrote: You are searching for the is-operator: var displayObject:DisplayObject = new Sprite(); trace(displayObject is DisplayObject); trace(displayObject is Sprite); trace(displayObject is UIComponent); Best regards --- In flexcoders@yahoogroups.com, Mark Carter code@ wrote: I've got an array of objects which I want to filter according to the object's class. The class itself is referenced by a variable so I cannot use the is operator. I'd like to be able to do something like: filterClass.isInstance(obj) Do I need to use isPrototypeOf()? - I don't really understand what that means. -- View this message in context: http://www.nabble.com/Equivalent-to-Java%27s- Class.isInstance%28Object%29-instance-method--tp20171501p20171501.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Equivalent-to-Java%27s-Class.isInstance%28Object%29-instance-method--tp20171501p20172786.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Ant tasks and spaces in paths?
use double quotes () when defining and parameters. At least it works for Windows and btw Flex and Flex Ant tools are free :) --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Can't really do either, as it comes from ${basedir} There are a few areas where Flex is decidedly beta-like for a version 3 product that costs so damned much. -Josh On Mon, Jul 14, 2008 at 2:31 PM, shaun [EMAIL PROTECTED] wrote: Josh McDonald wrote: Hey guys. There *must* be something I'm doing wrong here. In my ant build: compc output='${bin.dir}/${targetLibrary}' source-path path-element=${src.dir}/ /compc Now src.dir is: /Users/josh/Desktop/Work/Builder workspace/PathwaysVersions/src And I'm getting the following error from Ant: command line: Error: unknown configuration variable 'compiler.source-path /Users/josh/Desktop/Work/Builder,workspace/PathwaysVersions/src' Which is clearly just blowing the space out into two different instances of the sp param. How do I embed quotes or something so this doesn't happen? I've tried using ' as well as quot; but with no luck. Any ideas? Escape the space. /Users/josh/Desktop/Work/Builder\ workspace/PathwaysVersions/src If that doesnt work. Create a symlink. :) cheers, shaun -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: Comparing numbers with a tolerance
you always could compare points using distance between them Point.distance(p1,p2) tolerance --- In flexcoders@yahoogroups.com, fumeng5 [EMAIL PROTECTED] wrote: Hi, I'm trying to compare 3 points but because of double precision in AS3 i'm running into some issues with trailing digits causing the numbers to not be equal, i.e. 1.25 != 1.24999 what i'd like to figure out how to do is introduce a tolerance of say .001. then i'd compare the test point against the other two points saying: is testPoint.x within the range of point1.x and point2.x and is testPoint.y within the range of point1.y and point2.y. if so, return true. i just can't figure it out. here's what i have so far: public static function isEndPoint(p:Point, Lp1:Point, Lp2:Point):Boolean { var tolerance:int = .001; var newLp1:Point = new Point(tolerance * Lp1.x,tolerance * Lp1.y); var newLp2:Point = new Point(tolerance * Lp2.x,tolerance * Lp2.y); return (p.equals(newLp1) || p.equals(newLp2)); } I guess I'm seeing that the equals() method at the bottom of this code is not really what i want. Plus, multiplying everything by .001 doesn't solve the problem as i'll essentially be using the same numbers i started with. Can someone perhaps point me in the right direction here, please? I'm not sure where exactly to go from here. Thanks, fumeng.
[flexcoders] Re: Float number calculation in AS3
i think it's not the bug of AS3 or Flex but processor, and this quite fundamental so this is a feature not a bug :) use rounding to arbitrary precision (it's what other languages do) and for finance calculations it's better to use integers and modular arithmetic, i guess --- In flexcoders@yahoogroups.com, Vadim Melnik [EMAIL PROTECTED] wrote: Hello All, Its should be very simple, I saw posts related to this issue before in this list, but somehow was unable to find it right now. Below is listed simple test case for problem: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=test() mx:Script![CDATA[ private function add(v1:*, v2:*, v0:*):* { var v3:* = v1+v2; var status:String = (v0==v3)?OK:failure; trace((+v1+) + (+v2+) = +v3+, +status); return v3; } private function test():void { add(1.2, 1, 2.2); add(1.2, -1, 0.2); add(82003.9, -16923, 65080.9); add(3.2, -1, 2.2); } ]]/mx:Script /mx:Application And result output: (1.2) + (1) = 2.2, OK (1.2) + (-1) = 0.19996, failure (82003.9) + (-16923) = 65080.8994, failure (3.2) + (-1) = 2.2, OK Is it bug or special behavior in AS3 by design, that second and third add calls produces strange results instead of 0.2 and 65080.9. In other words it's impossible to compare two calculated financial values on Flex side . -- Thanks, Vadim.
[flexcoders] Re: Flex blog topics - what should I write about?
hi, just one piece of advice - google for your next blog's subject before posting to see if it's already widely known. I read many blogs and 90% of the bloggers just rediscovering a bicycle again. (though they do write something interesting in the rest 10% so i'm still reading them :)) --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Hey guys, Working on a Flex related blog. I'm not an �ber-guru, but I'd like a place to collect tips, and FAQs I find myself answering here fairly often ;-) No URL yet, not launching it for a few weeks, just trying to cook up content for now. Wondering what topics people would like to see more written about? Keeping in mind my areas of expertise are mainly in custom components and some of the required voodoo, (hopefully good) application architecture practices, and the internals of the Web Service code. -Josh -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: Why does IE7 display # for tab title?
is it deeplinking stuff? try to turn off history support in compiler's properties --- In flexcoders@yahoogroups.com, paulbohnenkamp [EMAIL PROTECTED] wrote: In IE7 I see the tab title appears with the correct logo but a label of simply # . In Firefox the tab is correctly labeled. In the jsp that launches the app the title tag is there and set. Does anyone know the fix for IE7 to show the title correctly?
[flexcoders] Re: Compiling CSS to SWF on server
i think you would need access to compiler java api to do that. start with creating VirtualLocalFile, generate a dummy class file with all those [Embedded] for uploaded fonts, and compile it using Flex Compiler API. You don't need command line tools for this. Andrii Olefirenko --- In flexcoders@yahoogroups.com, Sergey Kovalyov [EMAIL PROTECTED] wrote: Hi All! Does somebody have experience compiling CSS to SWF on server using Flex command line compiler? I want to allow users use their own fonts in application. To do that first they have to upload TTF true type font to server, then create CSS that references uploaded font file on the flight and at last compile it to SWF. Thus it would be possible to load the resulting SWF via StyleManager. What do you think about this strategy? Sergey.
[flexcoders] Re: Excel type dataGrid
Hi, i did i didn't use DataGrid though, i needed more than just frozen columns so i went with my own implementation of spreadsheet component. If you need only frozen first column, you could fake it by placing second grid on the left side, which would hold only one column (kinda frozen one) Andrii Olefirenko --- In flexcoders@yahoogroups.com, markgoldin_2000 [EMAIL PROTECTED] wrote: Anyone has tried to create an Excel type of DataGrid? Specifically, when a number of columns on a left can be frozen while the rest is scrolled horizontally? Thanks
[flexcoders] Re: Singletons - Best Practices
i don't know about best practices but it's quite easy to implement package test { import flash.utils.Dictionary; public class SingletonManager { private static const instances:Dictionary = new Dictionary; public static function getInstance(clazz:Class):Object { if (!instances[clazz]) { instances[clazz] = new clazz; } return instances[clazz]; } } } Also you could take a look at slightly complex implementation in Flex - mx.core.Singleton Also you would probably need to force users of your class not to use public constructor. It could be easy done with following (extract) private static var iExists:Boolean; public function MyClass() { if (iExists) { throw new Error(My only instance already exists!); } iExists = true; } Regards, Andrii Olefirenko --- In flexcoders@yahoogroups.com, Dominic Pazula [EMAIL PROTECTED] wrote: I'm attempting to write singleton manager for my application. I've seen numerous ways for this to be done. I traced through how the BrowserManager and the PopUpManager are implemented. (For the record, I tried, and failed, to copy how BrowserManager is implemented). Does anyone know what the best practices are on creating this type of class? Any gotchas to look out for? Thanks Dominic
[flexcoders] Re: Flex 3 can save chart as image
the flash app is potentially dangerous application. so is its data. only data retrieved from the server is trusted (as long as i trust the site url). in other words, the site gives trusted data and untrusted apps (like flash, javascript or java applets), untrusted apps can produce only untrusted data. (for example i could write an app that will make jpg with broken structure that will cause buffer-overflow and eventually virus injection - if i upload/download this broken image via server I at least could blame the site owner) anyway, you could use Adobe Air for such kind of things :) I think I'm mostly with you on this one - the situation we have now is ridiculous - flash and flex developers routinely getting around the sandbox using what effectively are workarounds using other technology to implement file-saving. I can understand why the sandbox is there and why Adobe might be reluctant to give way on the file-saving issue - the last thing we need is to have the flash player dubbed as some unsafe platform. It may be that the real problem is not a technical objection but a political one - to save the player from adverse publicity. If the file save feature were to be allowed, it would always have to be interactive, though perhaps the dialog could be allowed to save several files in one go and we could also perhaps live with it only saving certain file types (or issue dire warnings about writing some others such as .bat or .exe files). Inevitably some users will always just say 'yes' to giving permission to write, simply because they aren't that savvy about OS technicalities. I wonder if there could be a mini-sandbox that would protect the user from malicious code trying to write to OS sensitive areas? For 90% of the use-cases for writing files, I think restricting writing to graphics file types and perhaps xml and non-executable files would make developers more than happy.
[flexcoders] Re: Flex Builder 3.0 Serial No. Need
I guess Adobe Flex engineers did better work protecting their stuff by making it open source :) as for sdks\3.0.0\lib\license.jar - i've just deleted this jar and my laptop didn't blow up - am I chosen one?... Andrii Olefirenko --- In flexcoders@yahoogroups.com, Oleg Filipchuk [EMAIL PROTECTED] wrote: Guyz, there are still holes in licence.jar in particular sdks - sdks\3.0.0\lib\license.jar and sdks\2.0.1\lib\license.jar. I guess that Adobe Flex engineers could implement better way to secure their work. -- Best regards, Oleg Filipchuk
[flexcoders] Re: Flex Builder 3.0 Serial No. Need
BTW, does it mean that I can't compile application that uses charting components without watermarks using Ant script (without Flex Builder Pro)? --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: Removing license.jar means you won't be able to remove the charting watermark if you choose to go Pro. I'm sure there are holes in license.jar, just like there are holes in any licensing system. We do what we think is reasonable and then trust that most folks will be honorable and pay for their license (or receive a license through otherwise legitimate means). Matt On 3/3/08 7:08 AM, andrii_olefirenko [EMAIL PROTECTED] wrote: I guess Adobe Flex engineers did better work protecting their stuff by making it open source :) as for sdks\3.0.0\lib\license.jar - i've just deleted this jar and my laptop didn't blow up - am I chosen one?... Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com , Oleg Filipchuk justversus@ wrote: Guyz, there are still holes in licence.jar in particular sdks - sdks\3.0.0\lib\license.jar and sdks\2.0.1\lib\license.jar. I guess that Adobe Flex engineers could implement better way to secure their work. -- Best regards, Oleg Filipchuk
[flexcoders] Re: Flex Builder 3.0 Serial No. Need
Please, ignore - i've seen the answer already, sorry --- In flexcoders@yahoogroups.com, andrii_olefirenko [EMAIL PROTECTED] wrote: BTW, does it mean that I can't compile application that uses charting components without watermarks using Ant script (without Flex Builder Pro)? --- In flexcoders@yahoogroups.com, Matt Chotin mchotin@ wrote: Removing license.jar means you won't be able to remove the charting watermark if you choose to go Pro. I'm sure there are holes in license.jar, just like there are holes in any licensing system. We do what we think is reasonable and then trust that most folks will be honorable and pay for their license (or receive a license through otherwise legitimate means). Matt On 3/3/08 7:08 AM, andrii_olefirenko andriyo@ wrote: I guess Adobe Flex engineers did better work protecting their stuff by making it open source :) as for sdks\3.0.0\lib\license.jar - i've just deleted this jar and my laptop didn't blow up - am I chosen one?... Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com , Oleg Filipchuk justversus@ wrote: Guyz, there are still holes in licence.jar in particular sdks - sdks\3.0.0\lib\license.jar and sdks\2.0.1\lib\license.jar. I guess that Adobe Flex engineers could implement better way to secure their work. -- Best regards, Oleg Filipchuk
[flexcoders] Re: Is setting custom headers on HTTPService for a GET possible?
If i'm not wrong, this is security restriction in Flash player. Some headers like Referer and the like shouldn't be added or modified by untrusted program (e.g. flash movie) I would consider using binary sockets to implement your own http stack, if you need these headers badly. Andrii Olefirenko --- In flexcoders@yahoogroups.com, ivo [EMAIL PROTECTED] wrote: Hello all, Thought I'd repost again since I am curious as to the answer. I am thinking I am missing something blindingly obvious since no one bothers to reply. Must be a valid question because I have gotten three private me too replies. I need to communicate with a web service where I need to set custom headers. Seems to work as expected for both GET and POST under AIR. Using web browsers the custom headers are only included for POST when using HTTPService and never for URLLoader. Couldnt find in the docs if this is by design or a bug since they lead me to believe this should be possible (except for the blacklisted headers). Thanks, - Ivo - Original Message From: ivo [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, February 29, 2008 11:51:32 AM Subject: Re: [flexcoders] Is setting custom headers on HTTPService for a GET possible? Debugging a bit further shows that the same behavior happens when using a URLLoader. Then the custom headers are not sent. Under Air tho the custom headers are always sent, GET or POST. These headers are all truly custom so they are not in the URLRequestHeader blacklist. Is there a way to set custom headers on a GET? Short of opening a Socket connection and writing out the HTTP requests? Thanks, - Ivo - Original Message From: ivo cervantes_vive@ yahoo.com To: [EMAIL PROTECTED] ups.com Sent: Friday, February 29, 2008 10:06:45 AM Subject: [flexcoders] Is setting custom headers on HTTPService for a GET possible? Hey all, Don't see it indicated in the docs but debugging revealed that custom headers set on an HTTPService GET are not sent. Is this correct or am I missing something? var httpService: HTTPService = new HTTPService( ); httpService. method = 'GET'; httpService. headers = {customHeader: 'foobar'}; httpService. send({}); /* server-side all I see is: [Fri Feb 29 10:05:34 2008] [error] Accept: */* [Fri Feb 29 10:05:34 2008] [error] Accept-Encoding: gzip, deflate [Fri Feb 29 10:05:34 2008] [error] Accept-Language: en [Fri Feb 29 10:05:34 2008] [error] Connection: keep-alive [Fri Feb 29 10:05:34 2008] [error] Content-Length: 14 [Fri Feb 29 10:05:34 2008] [error] Content-Type: application/ x-www-form- urlencoded If I switch method = 'POST' then I see: [Fri Feb 29 10:06:12 2008] [error] customHeader: foobar */ Thanks, - Ivo !-- #ygrp-mkp{ border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;} #ygrp-mkp hr{ border:1px solid #d8d8d8;} #ygrp-mkp #hd{ color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;} #ygrp-mkp #ads{ margin-bottom:10px;} #ygrp-mkp .ad{ padding:0 0;} #ygrp-mkp .ad a{ color:#ff;text-decoration:none;} -- !-- #ygrp-sponsor #ygrp-lc{ font-family:Arial;} #ygrp-sponsor #ygrp-lc #hd{ margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;} #ygrp-sponsor #ygrp-lc .ad{ margin-bottom:10px;padding:0 0;} -- !-- #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0;} #ygrp-tpmsgs{ font-family:Arial; clear:both;} #ygrp-vitnav{ padding-top:10px;font-family:Verdana;font-size:77%;margin:0;} #ygrp-vitnav a{ padding:0 1px;} #ygrp-actbar{ clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;} #ygrp-actbar .left{ float:left;white-space:nowrap;} .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana;font-size:77%;padding:15px 0;} #ygrp-ft{ font-family:verdana;font-size:77%;border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px;} #ygrp-vital{ background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;} #ygrp-vital #vithd{ font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;} #ygrp-vital ul{ padding:0;margin:2px 0;} #ygrp-vital ul li{ list-style-type:none;clear:both;border:1px solid #e0ecee; } #ygrp-vital ul li .ct{ font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;} #ygrp-vital ul li .cat{ font-weight:bold;} #ygrp-vital a{ text-decoration:none;} #ygrp-vital a:hover{ text-decoration:underline;} #ygrp-sponsor #hd{ color:#999;font-size:77%;} #ygrp-sponsor #ov{ padding:6px
[flexcoders] Re: books, tutorials, articles on security issue
i think there so no anything special in flex/php regarding security issues. maybe only that you should keep in mind that flex client code is executed by untrusted machine while php code is trusted as it's executed on the server. so flex app is less secure by default if apply the same principles as you did for server side framework/language. the best methodology is to advertise your site as the most secure one and wait till hackers bomb it, then fix and repeat again :) MD5/SHA are hash functions not cipher function (encrypt/decrypt) Andrii Olefirenko --- In flexcoders@yahoogroups.com, Heiko Niemann [EMAIL PROTECTED] wrote: Hi, I am looking for books, tutorials, articles that cover aspects, best practices, and/or concepts of security issues - some kind of overview. Right now I am struggling to put together all the pieces you get when you google for keywords like authentication management, encryption, as3corelib, sql injection, ... My setup will be: flex app with user login and data requests, php scripts, mySQL database. Questions: 1) What is the 'best' way to design a secure login process in flex? 2) After login, how will I authenticate when doing data requests? 3) Working with GUID/UUID tokens, will I have to encrypt those to make their use secure? ... or is that a stupip question? :) 4) Is there any sample how to use the MD5/SHA1 encryption and decrypt it with php? 5) I have found the term 'challenge-response methodology'. Anybody know a (flex/php) sample for that? These security issues are so overwhelming once you have to move from the intranet or localhost to the real world. :) Thanks for your help, Heiko
[flexcoders] Re: Flex Builder 3.0 Serial No. Need
it's so cute :) i bet you need it URGENT? --- In flexcoders@yahoogroups.com, devang solanki [EMAIL PROTECTED] wrote: Dear Friends if any one have flex builder 3.0 serial no or crack, then please forward to me, i need it Regards Devang
[flexcoders] Re: Flex Builder 3.0 Serial No. Need
BTW, i remember FB 3 Betas were quite easy to fix given decompilable nature of java code; they had these buggy day counters... i don't know if it's true for release version. --- In flexcoders@yahoogroups.com, andrii_olefirenko [EMAIL PROTECTED] wrote: it's so cute :) i bet you need it URGENT? --- In flexcoders@yahoogroups.com, devang solanki devang.flex@ wrote: Dear Friends if any one have flex builder 3.0 serial no or crack, then please forward to me, i need it Regards Devang
[flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o
The trick is to keep hash value of all elements of the array. Prerequisites are following: 1. Hash function H(index, object) should return unique value for the object and the index of this object in the array (so two equal objects in different positions have different hash value, H(i, obj1) != H(j,obj1) - this will force the order of elements). 2. On add/remove/modify operation, compute value h=f(h1, H(i, obj)), where h1 - old hash value for the array, f - composition function (XOR for example but could be something else). For empty array h1 equals some initial value (like 0). Then to check if two arrays are equal you just need to compare h values of both arrays, which is O(1) operation. Of course, modifying an array would become more expensive operation, but it's still O(1) operation, so you basically eliminate all O(n) (loops over array of data) Of course, there could be more optimisation done if we knew more about particular requirements. Andrii Olefirenko --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: Can you give more detail? I don't believe there is any O(1) algorithm for this. O(1) means that comparing two 100,000-element arrays would take the same time as comparing two 100-element arrays. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andrii_olefirenko Sent: Saturday, February 23, 2008 1:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o if you are really concerned about performance I would recommend to hash values added to the array into common hash and then comparing two arrays would take only O(1) not O(n) Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sergey Kovalyov skovalyov.flexcoders@ wrote: What is the best way to compare two arrays element by element ignoring the order? My solution: var differs : Boolean = (a.length != b.length) || a.some( function(item : Object, index : int, array : Array) : Boolean { return (b.indexOf(item) == -1); }); May be the better solution exists?
[flexcoders] Re: HTTP Methods
Look up URLRequestMethod constants. Just use them to define the http method - no need for proxy of any kind. (the server you are making request to should understand these methods, of course) --- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] wrote: Hello folks, I have come across this article http://blogs.adobe.com/kiwi/2006/07/making_http_calls_in_actionscr.html, where it says that the HTTPService supports the basic HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE). Does it mean when using a proxy? Where can I find an example? Thanks in advance, Fidel.
[flexcoders] Re: HTTP Methods
Hmm, yeah, you are right, the doc actually tells that there should be whole branch of constants... Try to put string values directly instead of constants: PUT, DELETE instead of URLRequestMethod.PUT and URLRequestMethod.DELETE. If this won't do magic, then i see only solution is to use socket connections... Andrii Olefirenko --- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] wrote: Hi Andrii, Before asking this question, I have checked URLRequestMethod, and I only see POST and GET available. I need to use PUT and DELETE. Basically, I am trying to communicate my Flex app with a restfull webservice, which uses POST, GET, PUT and DELETE. Has anyone tried this before? How have you done this? Thanks in advance, Fidel.
[flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o
That's right if you treat a user as continuous array of input data. If the user is a human, that won't be the case. O(1) + O(1).. + O(1) won't do O(N) in total. Imagine the users who enters/modify the data in two arrays (via Flex app). They need to see if two arrays are identical. Our flex app will be O(1) if its response time is constant and doesn't depend on amount of data they already entered. In case of hash algorithm, this response time is slightly more that in usual algorithm (the computers are pretty good at calculating numeric values) but users won't notice this increase (it's just fractions of a second) Even if in total input time is bigger, i don't care (I would do care if my fingers were faster than calculation of hash value) And then it doesn't matter how many data you have in your arrays: 100 or 10 items. You got feedback in O(1) manner - just comparing two numeric values - instantly. Hope this will make the clear the approach - it's not magic - one always pays - in this case i compare arrays not once in one loop but split the loop into many O(1) operations. (it's basically how multithreading works) Andrii Olefirenko --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: Of course, modifying an array would become more expensive operation, but it's still O(1) operation The overhead when modifying each element is O(1), so the total overhead you've incurred is O(n). Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andrii_olefirenko Sent: Sunday, February 24, 2008 7:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o The trick is to keep hash value of all elements of the array. Prerequisites are following: 1. Hash function H(index, object) should return unique value for the object and the index of this object in the array (so two equal objects in different positions have different hash value, H(i, obj1) != H(j,obj1) - this will force the order of elements). 2. On add/remove/modify operation, compute value h=f(h1, H(i, obj)), where h1 - old hash value for the array, f - composition function (XOR for example but could be something else). For empty array h1 equals some initial value (like 0). Then to check if two arrays are equal you just need to compare h values of both arrays, which is O(1) operation. Of course, modifying an array would become more expensive operation, but it's still O(1) operation, so you basically eliminate all O(n) (loops over array of data) Of course, there could be more optimisation done if we knew more about particular requirements. Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: Can you give more detail? I don't believe there is any O(1) algorithm for this. O(1) means that comparing two 100,000-element arrays would take the same time as comparing two 100-element arrays. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of andrii_olefirenko Sent: Saturday, February 23, 2008 1:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o if you are really concerned about performance I would recommend to hash values added to the array into common hash and then comparing two arrays would take only O(1) not O(n) Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Sergey Kovalyov skovalyov.flexcoders@ wrote: What is the best way to compare two arrays element by element ignoring the order? My solution: var differs : Boolean = (a.length != b.length) || a.some( function(item : Object, index : int, array : Array) : Boolean { return (b.indexOf(item) == -1); }); May be the better solution exists?
[flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o
I'm not a math guy, I'm more of a miracle guy(c) :) Picking up a good hash function is art :) I would start with MD5 over serialized version of the object, but there could be more effective hash functions if you know more about object structure. --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: I agree that it is O(1) in the sense that you describe, because the O(n) work has been amortized to be imperceptible. Do you actually know of a good hash function for this case? - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andrii_olefirenko Sent: Sunday, February 24, 2008 7:21 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o That's right if you treat a user as continuous array of input data. If the user is a human, that won't be the case. O(1) + O(1).. + O(1) won't do O(N) in total. Imagine the users who enters/modify the data in two arrays (via Flex app). They need to see if two arrays are identical. Our flex app will be O(1) if its response time is constant and doesn't depend on amount of data they already entered. In case of hash algorithm, this response time is slightly more that in usual algorithm (the computers are pretty good at calculating numeric values) but users won't notice this increase (it's just fractions of a second) Even if in total input time is bigger, i don't care (I would do care if my fingers were faster than calculation of hash value) And then it doesn't matter how many data you have in your arrays: 100 or 10 items. You got feedback in O(1) manner - just comparing two numeric values - instantly. Hope this will make the clear the approach - it's not magic - one always pays - in this case i compare arrays not once in one loop but split the loop into many O(1) operations. (it's basically how multithreading works) Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: Of course, modifying an array would become more expensive operation, but it's still O(1) operation The overhead when modifying each element is O(1), so the total overhead you've incurred is O(n). Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of andrii_olefirenko Sent: Sunday, February 24, 2008 7:18 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o The trick is to keep hash value of all elements of the array. Prerequisites are following: 1. Hash function H(index, object) should return unique value for the object and the index of this object in the array (so two equal objects in different positions have different hash value, H(i, obj1) != H(j,obj1) - this will force the order of elements). 2. On add/remove/modify operation, compute value h=f(h1, H(i, obj)), where h1 - old hash value for the array, f - composition function (XOR for example but could be something else). For empty array h1 equals some initial value (like 0). Then to check if two arrays are equal you just need to compare h values of both arrays, which is O(1) operation. Of course, modifying an array would become more expensive operation, but it's still O(1) operation, so you basically eliminate all O(n) (loops over array of data) Of course, there could be more optimisation done if we knew more about particular requirements. Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: Can you give more detail? I don't believe there is any O(1) algorithm for this. O(1) means that comparing two 100,000-element arrays would take the same time as comparing two 100-element arrays. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of andrii_olefirenko Sent: Saturday, February 23, 2008 1:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o if you are really concerned about performance I would recommend to hash values added to the array into common hash and then comparing two arrays would take only O(1) not O(n
[flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o
I'm pretty sure about MD5 transposition quality as it's used to hash passwords, it's not ordinary check sum. So yes, it's order depended. And therefore serialization of the object fields should be ordered (in alphabetical order, for instance) And it is indeed ordered, as far as i remember. --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: But MD5 is order-dependent, isn't it? Otherwise, MD5 would say that documents containing hello, world and world, hello are the same. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andrii_olefirenko Sent: Sunday, February 24, 2008 7:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o I'm not a math guy, I'm more of a miracle guy(c) :) Picking up a good hash function is art :) I would start with MD5 over serialized version of the object, but there could be more effective hash functions if you know more about object structure. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: I agree that it is O(1) in the sense that you describe, because the O(n) work has been amortized to be imperceptible. Do you actually know of a good hash function for this case? - Gordon From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of andrii_olefirenko Sent: Sunday, February 24, 2008 7:21 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o That's right if you treat a user as continuous array of input data. If the user is a human, that won't be the case. O(1) + O(1).. + O(1) won't do O(N) in total. Imagine the users who enters/modify the data in two arrays (via Flex app). They need to see if two arrays are identical. Our flex app will be O(1) if its response time is constant and doesn't depend on amount of data they already entered. In case of hash algorithm, this response time is slightly more that in usual algorithm (the computers are pretty good at calculating numeric values) but users won't notice this increase (it's just fractions of a second) Even if in total input time is bigger, i don't care (I would do care if my fingers were faster than calculation of hash value) And then it doesn't matter how many data you have in your arrays: 100 or 10 items. You got feedback in O(1) manner - just comparing two numeric values - instantly. Hope this will make the clear the approach - it's not magic - one always pays - in this case i compare arrays not once in one loop but split the loop into many O(1) operations. (it's basically how multithreading works) Andrii Olefirenko --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: Of course, modifying an array would become more expensive operation, but it's still O(1) operation The overhead when modifying each element is O(1), so the total overhead you've incurred is O(n). Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of andrii_olefirenko Sent: Sunday, February 24, 2008 7:18 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o The trick is to keep hash value of all elements of the array. Prerequisites are following: 1. Hash function H(index, object) should return unique value for the object and the index of this object in the array (so two equal objects in different positions have different hash value, H(i, obj1) != H(j,obj1) - this will force the order of elements). 2. On add/remove/modify operation, compute value h=f(h1, H(i, obj)), where h1 - old hash value for the array, f - composition function (XOR for example but could be something else). For empty array h1 equals some initial value (like 0). Then to check if two arrays are equal you just need to compare h values of both arrays, which is O(1) operation. Of course, modifying an array would become more expensive operation, but it's still O(1) operation, so you basically eliminate all O(n) (loops over array of data) Of course, there could be more optimisation done if we knew
[flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o
if you are really concerned about performance I would recommend to hash values added to the array into common hash and then comparing two arrays would take only O(1) not O(n) Andrii Olefirenko --- In flexcoders@yahoogroups.com, Sergey Kovalyov [EMAIL PROTECTED] wrote: What is the best way to compare two arrays element by element ignoring the order? My solution: var differs : Boolean = (a.length != b.length) || a.some( function(item : Object, index : int, array : Array) : Boolean { return (b.indexOf(item) == -1); }); May be the better solution exists?
[flexcoders] Re: application exit event?
as there are no finalizers nor destructors, the same goes for finishing the application. Don't litter, and there would be nothing to clean up :) It's important to keep in mind that a user could kill browser process any time, without waiting for you code to do anything. Andrii Olefirenko --- In flexcoders@yahoogroups.com, Maciek Sakrejda [EMAIL PROTECTED] wrote: I need to perform some cleanup when the user exits the application (i.e., closes the page in which the application is embedded). Is there an event I can listen for? I've tried Event.REMOVED, FlexEvent.REMOVE, and Event.REMOVED_FROM_STAGE, but none of those seem to fire targetting the actual application object. Any ideas? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
[flexcoders] Re: Am I the only one who wishes EventDispatcher exposed its listeners?
I'm surprised that this thing works (i mean monkey patching). I think It's the worst case of code coupling. The use with event listeners is rare case when this approach is OK. I've started using FlexSpy with Events Listeners just now - it's great :) Thanks Andrii Olefirenko --- In flexcoders@yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: It's a feature of the flex compiler, which will take the newest version of any of the classes that it finds and use that version in the final app. So when you name classes exactly the same as the Flex framework classes (in this case mx.core.FlexSprite) then the compiler will use your local version instead of the version in the framework. On other languages similar functionality is called monkey patching, so that name has kind of stuck for this approach. Doug On 2/21/08, Jerome Clarke [EMAIL PROTECTED] wrote: is that a bug or something in the way Flex works... I've been thinking about this sort of feature for a long time... If I knew about it before ( assuming it's not a bug ) I would have done this a long time ago... along with implementing other things like deconstruct etc etc monkey patching eh... never heard of it thanks Doug On Thu, Feb 21, 2008 at 7:19 PM, Doug McCune [EMAIL PROTECTED] wrote: Just FYI, I posted an example of monkey patching FlexSprite to get this functionality: http://dougmccune.com/blog/2008/02/21/monkey-patching-flexsprite-to-list-all-event-listeners-on-any-flex-component/ Doug On 11/28/07, ben.clinkinbeard [EMAIL PROTECTED] wrote: Gotcha. Maybe you should try sending cookies along with the request, I've heard it works well on the Flex team. :) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: That would make sense, but it would be up to the Player team since EventDispatcher is a Player class. The Flex team can lobby the Player team for new features, but we don't get everything we ask for. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of ben.clinkinbeard Sent: Wednesday, November 28, 2007 12:35 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Am I the only one who wishes EventDispatcher exposed its listeners? Why in subclasses and not EventDispatcher itself? Ben --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: Does anyone from Adobe have info on why its not and/or if it might be someday? The Player's EventDispatcher class doesn't provide this capability, probably because it isn't part of the Document Object Model Level 3 Events Specification. (The Player obviously keeps a list of listeners, but this is done in C++ code and the list isn't exposed in ActionScript.) However, I suppose the framework could accomplish what you want by overriding addEventListener() and removeEventListener() in every subclass of EventDispatcher to keep track of the listeners. Please file an enhancement request at http://bugs.adobe.com/flex. http://bugs.adobe.com/flex. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com ] On Behalf Of ben.clinkinbeard Sent: Wednesday, November 28, 2007 6:04 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com Subject: [flexcoders] Am I the only one who wishes EventDispatcher exposed its listeners? Sometimes it would be really nice be able to access a list of currently attached listeners by doing something like myButton.listeners. Having that return a collection of objects that expose the event type and handler method would be nice and it doesn't seem like it would be that hard to implement since they're obviously already kept track of somewhere. Does anybody else wish this was provided? Does anyone from Adobe have info on why its not and/or if it might be someday? Thanks, Ben
[flexcoders] Re: ItemEditor looses focus and then crash
I remember the same problem - I did check for event.reason == DataGridEventReason.OTHER in order to prevent showing Alert window when the editor loses focus, not on canceling via Esc. In my case i couldn't use callLater because my Alert was actually asking (Yes/No) and not just warning Hope this help to solve your problem Andrii Olefirenko --- In flexcoders@yahoogroups.com, Dmitri Girski [EMAIL PROTECTED] wrote: Hi Alex and all, I was so inspired with the last victory over my focus problem (http://tech.groups.yahoo.com/group/flexcoders/message/102706) so I just went through the list of all focus related bugs. I've got another case of some weird behaviour regarding the loosing the focus. Test case is very simple - editable DataGrid, click anywhere in the cell, start editing and then press ESC key - the parent component keyboard events handler will throw an Alert box. If you choose Yes (discard changes and close the window) system crashes. Debugging shows that after Alert control has been closed Flex tries to resume editing in DataGrid - it starts again with editBegin event and then it crashes because system already started the removal of the window. The question is - what I am doing wrong? SWF: http://mitek.id.au/flex/TestItemEditorEsc.html Source code: http://mitek.id.au/flex/TestItemEditorEsc.mxml http://mitek.id.au/flex/TestItemEditor.mxml Thanks in advance! Dmitri.
[flexcoders] Re: do you need CS Degree to get a job?
as for me, developing web apps is really for dummies, i'd rather do something interesting in molecular biology... (but unfortunately I got this CS degree). As for hiring, i think there is no big need for Phds - Google and likes are big companies - they need soldiers too - to implement the ideas of those fews with big brains. So you always have a chance :) --- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote: A bit off-topic but I was just wondering since i have no reminescense of this and their seems to be a lot of programmers on here I thought I would ask this question. Do you actually need some sort of CS degree or Computer Related degree to get a job say in programming Web Applications or getting a Job at Adobe or MSFT or Google. I have a degree in Molecular Biology with a Chem Minor. I am Self-Taught so let me here some stories. Thanks. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
[flexcoders] Re: How can I FORCE a REDRAW of a DATAGRID
You could try this dataGrid.dataProvider.refresh(); //where dataGrid is object of DataGrid class Regards, Andrii --- In flexcoders@yahoogroups.com, mr_j_harris [EMAIL PROTECTED] wrote: I need to force a redraw of a datagrid. Adobe's or whoever's Cleverness is not working for me. I just want to have my computer redraw the DataGrid from 0,0 to the bottom right corner. My computer has nothing better to do than that for me or my users. Because elsewise it is show stale data.. See, I recomputer some values in thoe objects in the ArrayCollection dataProvider of the dataGrid. Please tell me the one, two or three lines of ActionScript that will do this. Oh yeah, without causing that TypeError #1009 thing ever. Alternatively, how can I force a redraw of a particular cell? I know the cell coordinates -- John Harris
[flexcoders] Re: DataGrid limit on amount of records or data?
the limitation is 2,147,483,648 to be precise. but DataGrid is human interaction component, why do you need to load so many records? Andrii Olefirenko --- In flexcoders@yahoogroups.com, Luke Vanderfluit [EMAIL PROTECTED] wrote: Hi. Im using flex with a hibernate backend. I have tables in a db that Id like to show using Datagrid. I have done tests and found that there is a limit to the number of records shown in the datagrid. Is this a limitation of the datagrid? How do I get around this? I currently am able to show around 5000 records. When I have tables of say 1 or 10 records, how do I show them? Thanks. Kind regards. Luke.
[flexcoders] Re: RPC: AsyncToken.addResponder vs addEventListener?
they just reopened it, if i'm not mistaken --- In flexcoders@yahoogroups.com, Jerome Clarke [EMAIL PROTECTED] wrote: ok nevermind... I think I found it now... because I'm not installing BlazeDS... I just downloaded it and thought it all be there just like the Flex SDK itself blazeds / resources / flex_sdk and then I had to extract the flex_sdk_3.zip which I thought was the Flex SDK that recently got released and thats where it all is thanks... sorry for going off subject Bjorn and Josh and OH MY GOD didn't know they released all the code in the RPC in mx.rpc and mx.messaging... thanks Adobe :p On Feb 7, 2008 7:21 AM, Jerome Clarke [EMAIL PROTECTED] wrote: ok thanks but still can't see it... I've got Flex 3 Beta 3 SDK ( build 121207 ) and I found that but it's only locale files nothing more... and in BlazeDS directory... there is no folder called frameworks... and the latest one I can download from adobe labs is this file blazeds_b1_020108 is that correct??? thanks On Feb 7, 2008 7:00 AM, Bjorn Schultheiss [EMAIL PROTECTED] wrote: sdks / frameworks / projects / rpc in blaze rc1 On 07/02/2008, at 5:51 PM, Jerome Clarke wrote: hi... sorry to be off subject... but you said source... where is the source... I don't see it anywhere except the JSP and Flex examples thanks On Feb 7, 2008 5:46 AM, Bjorn Schultheiss [EMAIL PROTECTED] wrote: Don't quote me.. I looked into the source for the first time when blaze rc1 was released. Its complicated. On ResultEvent is override mx_internal function callTokenResponders():void { if (token != null) token.applyResult(this); } Apply result is mx_internal function applyResult(event:ResultEvent):void { setResult(event.result); if (_responders != null) { for (var i:uint = 0; i _responders.length; i++) { var responder:IResponder = _responders[i]; if (responder != null) { responder.result(event); } } } } callTokenResponders is called by abstract invoker which also dispatchers the result/fault events at the same time mx_internal function dispatchRpcEvent(event:AbstractEvent):void { event.callTokenResponders(); if (!event.isDefaultPrevented()) { dispatchEvent(event); } } On 07/02/2008, at 4:11 PM, Josh McDonald wrote: You're right, I hadn't noticed that. That's actually kinda strange. When are they called, and what actually initiates the responders? Is it before or after the data or error events are dispatched? -Josh On Feb 7, 2008 3:03 PM, Bjorn Schultheiss [EMAIL PROTECTED] wrote: One thing i don't like about addResponder() is that there is no removeResponder(); On 07/02/2008, at 4:01 PM, Josh McDonald wrote: What's the prevailing wind / general thoughts on using token.addResponder vs adding event listeners, beside the one request vs all requests nature of it? Is one faster / better / more common that the other? -- Good people will do good things, and bad people will do bad things. But for good people to do bad thingsâthat takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Good people will do good things, and bad people will do bad things. But for good people to do bad thingsâthat takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: Java LCDS RemoteObjects with static methods
i think it would be better to use object methods just for a number of reasons. namely synchronization issues, method overriding issues (you can't override static methods) etc. and it's neither POJO nor EJB way to make static methods as endpoints for remote calls. you'd better wrap them up into object methods. Andrii Olefirenko --- In flexcoders@yahoogroups.com, Kevin [EMAIL PROTECTED] wrote: I had a programmer write a bunch of RemoteObjects for me in Java and I noticed that he wrote everything as a static method. It seems to make sense since most of this things are simple utilities, however, I also know that Flex is going to instantiate a class regardless of whether all it's methods are static. Is there anything wrong with using static methods in remote object calls? - Kevin
[flexcoders] Re: Executing local java
you could write a local service to access your java code. that's how i did it: along with AIR app, the Jetty web server is installed with all needed java libs and interfaces to access it (web services or AMF3). then my AIR app will just connect to localhost and execute local java code as remote one. voilia :) Andrii Olefirenko --- In flexcoders@yahoogroups.com, Jhonny Everson [EMAIL PROTECTED] wrote: Anyone does have a clue how to use flex for front-end for a Java application withou having to use a java server? On Jan 25, 2008 10:13 PM, Jhonny Everson [EMAIL PROTECTED] wrote: Hi, Can Adobe Air run a local java application? Like System.exec()? We are building a multi-agent system using Jade. I was thinking about doing the front-end using Air. -- Jhonny Everson -- Jhonny Everson
[flexcoders] Re: excel like evaluator for TextInput controls?
hi, i wrote one sometime ago - it's straightforward implementation as we used to do in CS classes back in the university (recursion heavily overused, parser makes tree-like structure, although parser is written using regexps), it supports basic arithmetic operators, variables and functions but not symbolic computation. http://www.idubee.com/spreadsheet/ login test password 123 i could open the code for this but it's highly coupled, so i'm not sure if it'd be useful or not for anyone Regards, Andrii Olefirenko --- In flexcoders@yahoogroups.com, pfkellogg [EMAIL PROTECTED] wrote: does anyone know of an excel like evaluator for TextInput controls? I wrote a basic one that looks for the opening equals sign and handles * / - + operators but i am looking for a more sophisticated one. If you know of one please let me know. thanks again. patrick kellogg
[flexcoders] Re: Flex + Spring + Hibernate - Lazy=true
hi, these problems caused mainly by AMF3 which is quite low level and sessionless. as i understand AMF3, it uses references for these objects only that are in the same request, so it assumes that neither server nor client remembers what objects were already sent. that's the main problem - just having this session aware protocol implemented will make all communication lazy by default. (in addition, it would be nice to be able to control how deeply object graph should be serialized for each particular request) regards, Andrii Olefirenko --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: We haven't released the source for blazeds yet but it is coming. It does not contain any AS source generation but I think that is easy to layer on and there are a bunch of decent implementations out there. There is better support for customizing the serialization process in blazeds (improved over 2.5.1). The beta for blazeds has some of this but we are adding even more between beta and the release. Implementing lazy loading is a bit of a pain with hibernate if you have to do it using remote object. There are two major issues: 1) the class names of the generated wrapper classes used by hibernate mess up the mapping of the class names used to find the right AS class. This one is easy to get around with this PropertyProxy mechanism. In fact, LC DS contains the source to a PropertyProxy implementation (HibernatePropertyProxy.java) which you can use with remote object to strip the generated class name off before serialization. This has the side effect of returning empty versions of all non-loaded lazy properties which brings us to problem 2). Note that hibernate has different mechanisms for doing the lazy loading.. it can do byte code modification but I haven't used that technique so I'm not sure how it works here. 2) If you did not fetch a property with lazy=true in hibernate before the session is closed, the attempt to access that property during serialization fails with the session closed error. To get around this, you can make sure you access all properties you need before the serialization.. this is the approach used by LC DS but because it has a model of the association properties, you don't have to code it up yourself. It is done by the assembler so it is automatic.Another hacky approach is to put a servlet filter in which opens up a hibernate session before calling the MessageBrokerServlet, then close the session once it returns. That means you lose control over the hibernate sessions in your application and you have a transaction which is open for the entire duration of the request which is not very flexible. There might also be performance problems if you have a session/transaction open while you are doing I/O. Not sure that will be a problem but these are the reasons we went with the prefetch mechanism in LC DS's hibernate assembler. In terms of the issues with hibernate in 2.5 and earlier versions, one of the trickiest things is that you need to make your data-management-config.xml match up with the hibernate config. We're hoping to get a chance into a future version which makes this not necessary since the configs are pretty similar. You also need to do the AS code which matches the Java code yourself (or use a 3rd party code gen tool). Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andrii_olefirenko Sent: Friday, January 11, 2008 5:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex + Spring + Hibernate - Lazy=true Assemblers are more for CRUD apps. And even with Hibernate assembler, i haven't achieved lazy loading (it was old version of FDS and maybe i didn't try hard but anyway). If anyone has been able to implement lazy loading with LCDS 2.5, let me know so at least i will be assured that this is possible :) in addition to lazy loading, there are also problems of multiple instances if the same object, and the need to manually write actionscript counterparts of java objects. IFAIK, there no tool for automated generation AS3 classes out of java classes in BlazeDS. For big projects with permanent changes to the objects it is pain to manually maintain both AS3 and java obejcts sync. it would be nice to implement all these features in open-sourced BlazeDS, but i didn't find any source code in distribution as for now. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Rodrigo Pereira Fraga rpffoz@ wrote: Oh my god =/ But who uses the LCDS, it does not contain a HibernateAssembler which implements the use of lazy? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , andrii_olefirenko andriyo@ wrote: BlazeDS (and LCDS as far as i remember) doesn't support this out of box
[flexcoders] Re: Flex + Spring + Hibernate - Lazy=true
BlazeDS (and LCDS as far as i remember) doesn't support this out of box. There are workarounds like 1) make you own DTO (hibernate free) 2) prefetch object dependencies 3) include metadata about lazy properties with you objects, control externalization to handle objects with metadata and so on. if you develop with Hibernate (or EJB3), lack of lazy object support makes BlazeDS simply unusable for real enterprise application devs. --- In flexcoders@yahoogroups.com, Rodrigo Pereira Fraga [EMAIL PROTECTED] wrote: Someone has some solution to use the Pattern OpenSessionInView with Flex using BlazeDS? I am using Spring and it contains a OpenSessionInViewFilter used in web.xml, and a OpenSessionInViewInterceptor. But it is different with Flex +) Someone has idea of how I can use the Lazy = true to hibernate with the Flex + Spring? Atenciosamente: --- | Rodrigo Pereira Fraga | http://www.digows.com e-mails: [EMAIL PROTECTED] [EMAIL PROTECTED] ---
[flexcoders] Re: Flex + Spring + Hibernate - Lazy=true
Assemblers are more for CRUD apps. And even with Hibernate assembler, i haven't achieved lazy loading (it was old version of FDS and maybe i didn't try hard but anyway). If anyone has been able to implement lazy loading with LCDS 2.5, let me know so at least i will be assured that this is possible :) in addition to lazy loading, there are also problems of multiple instances if the same object, and the need to manually write actionscript counterparts of java objects. IFAIK, there no tool for automated generation AS3 classes out of java classes in BlazeDS. For big projects with permanent changes to the objects it is pain to manually maintain both AS3 and java obejcts sync. it would be nice to implement all these features in open-sourced BlazeDS, but i didn't find any source code in distribution as for now. --- In flexcoders@yahoogroups.com, Rodrigo Pereira Fraga [EMAIL PROTECTED] wrote: Oh my god =/ But who uses the LCDS, it does not contain a HibernateAssembler which implements the use of lazy? --- In flexcoders@yahoogroups.com, andrii_olefirenko andriyo@ wrote: BlazeDS (and LCDS as far as i remember) doesn't support this out of box. There are workarounds like 1) make you own DTO (hibernate free) 2) prefetch object dependencies 3) include metadata about lazy properties with you objects, control externalization to handle objects with metadata and so on. if you develop with Hibernate (or EJB3), lack of lazy object support makes BlazeDS simply unusable for real enterprise application devs. --- In flexcoders@yahoogroups.com, Rodrigo Pereira Fraga rpffoz@ wrote: Someone has some solution to use the Pattern OpenSessionInView with Flex using BlazeDS? I am using Spring and it contains a OpenSessionInViewFilter used in web.xml, and a OpenSessionInViewInterceptor. But it is different with Flex +) Someone has idea of how I can use the Lazy = true to hibernate with the Flex + Spring? Atenciosamente: --- | Rodrigo Pereira Fraga | http://www.digows.com e-mails: rpffoz@ rfraga@ ---
[flexcoders] Re: Spreadsheet application in Flex
Hello, Just let you know that we implemented the features you asked about, and not only them. - File manager (open file, new file, save file, save-as file, import file) - Cell formatting (string, numeric) - Address/formula bar - Address selection with mouse when typing in formulas and many others our full to-do list (and new screencast) is here http://andriyo.kiev.ua/archives/16 No design yet, pure nerdy style but our designer promised to put some charm on it soon. Sorry that it's only screencasts, we don't have the server yet but I hope we get one soon, so you'll be able to try it in live Andrii Olefirenko --- In flexcoders@yahoogroups.com, bloodylag [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, andrii_olefirenko andriyo@ wrote: Just watched the video, pretty cool looking demo. Though I noticed a few things 1. The part where he was showing off the SUM. He went from the inital row to also the row where he was putting the formula (I10 - I14) though the numbers only went from I10 - I13. It gave the result of 20, which I guess is right since he did 1 + 2 + 3 + 4 = 10 + =SUM(of those 4 numbers) which is 20. Though I pretty sure normal spreadsheets will error on that, I tried it in google spreadsheets and it throws a #REF error. 2. Will you support when doing an equation cell highlighting to automatically fill in the equation. IE =SUM( user clicks cells and it puts it in)? 3. Also will you have a textbox which shows the current formula for the currently selected cell?
[flexcoders] Re: Spreadsheet application in Flex
Thanks for feedback 1. yes, the formula evaluator doesn't check for valid ranges yet, though in this case it could be like recursion calculations but it will end up with infinite recursion - which is not good :) 2. yes, it will be implemented cause i''m pretty tired of entering addresses by hand too :) 3. yes, actually the box below is for this (it displays only current address now, but it's quite easy to implement editing formulas and stuff) again, thank you for your comments --- In flexcoders@yahoogroups.com, bloodylag [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, andrii_olefirenko andriyo@ wrote: Hello guys, We started developing a spreadsheet application (not only a component) built in Flex. It's in deep Alpha stage but we are going to extend functionality so it will be decent and free replacement for desktop spreadsheet applications. For version 1.0 following will be implemented 1. Cell selection - done 2. ABC/123 Rules - done 3. Content copy/cut/paste - done 4. Cell editing - done 5. Row/Column/Cell formatting - done 6. Cursor browsing (Tab, Enter) - done 7. Basic formula evaluation - done 8. MS Office format support - work in progress 9. Data sorting 10. Data search 11. File saving on the server, on the client, loading from the server, from the client, file revisions Read more info and watch demo here http://andriyo.kiev.ua/archives/11 I'd really appreciate your comments and critics:) Andrii Olefirenko Just watched the video, pretty cool looking demo. Though I noticed a few things 1. The part where he was showing off the SUM. He went from the inital row to also the row where he was putting the formula (I10 - I14) though the numbers only went from I10 - I13. It gave the result of 20, which I guess is right since he did 1 + 2 + 3 + 4 = 10 + =SUM(of those 4 numbers) which is 20. Though I pretty sure normal spreadsheets will error on that, I tried it in google spreadsheets and it throws a #REF error. 2. Will you support when doing an equation cell highlighting to automatically fill in the equation. IE =SUM( user clicks cells and it puts it in)? 3. Also will you have a textbox which shows the current formula for the currently selected cell?
[flexcoders] Spreadsheet application in Flex
Hello guys, We started developing a spreadsheet application (not only a component) built in Flex. It's in deep Alpha stage but we are going to extend functionality so it will be decent and free replacement for desktop spreadsheet applications. For version 1.0 following will be implemented 1. Cell selection - done 2. ABC/123 Rules - done 3. Content copy/cut/paste - done 4. Cell editing - done 5. Row/Column/Cell formatting - done 6. Cursor browsing (Tab, Enter) - done 7. Basic formula evaluation - done 8. MS Office format support - work in progress 9. Data sorting 10. Data search 11. File saving on the server, on the client, loading from the server, from the client, file revisions Read more info and watch demo here http://andriyo.kiev.ua/archives/11 I'd really appreciate your comments and critics:) Andrii Olefirenko