[flexcoders] Advanced custom components in Flex Builder 3
Hi all. I'm trying to determine if any of the following are possible in design mode in Flex Builder 3: * have new custom components appear in a category other than Custom * if there are multiple custom components with the same name but appear in different packages, cause only one package's version to be displayed * supplant any or all of the built-in components with replacements of my choosing Has anyone done this? Is it even possible? I have a very large library of custom components, and having them all fall into the Custom category makes it darn near impossible for a user to find what they want. Any help would be greatly appreciated. This is an area where the docs (that I can find anyway) are not very detailed.
[flexcoders] Lexical scoping of variable declarations not working?
I'm seeing some odd behavior with the AS3 compiler. I say it's odd because it's at variance with the vast majority of C language derivatives (in fact, I'll go out on a limb and say ALL of them). The behavior I'm seeing is this: If I have package { public class badscope { public function dummy() : void { if (new Date() != null) { var foo : Number = 3; } else { var foo : Number = 4; } } } } the cmopiler is telling me that foo is a duplicate declaration. Um. Every other block structured language I'm familiar with scopes local variable declaration to the enclosing block, so the foo's do not exist in the same lexical scope and there is no conflict. To me, if this behavior of placing all variable declarations in the top level function's scope is in fact the desired behavior, it's a HUGE step backwards. Please help me to understand why I'm seeing the behavior I am, and why it's not breaking lexical scoping rules common to C derivatives.
[flexcoders] Re: CSS type selectors are not supported in components
Well, I am sure if I comment out the mx:Style source=.../ in the top level application, that the warnings go away. Is it possible that the compiler is being overly picky, and only allows literally mx:Application as the root element, and not some class dervived from mx:Application? I know in the past that Flex made mx:Application more equal than other classes, such that the debugger wouldnt' recognize subclasses of it as being legitimate top level application classes. --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: Is there some salient difference between inline inclusion vs. external definitions? No. Writing mx:Style source=.../ should be the same as putting the contents of the CSS file between mx:Style and /mx:Style. Are you sure you have mx:Style only in mx:Application and not in any of the components that your application is using? - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sbyrne_dorado Sent: Wednesday, January 10, 2007 8:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: CSS type selectors are not supported in components I'm getting this error message from within an mx:Application (well a subclass thereof) that includes things via mx:Style source=.../. Is there some salient difference between inline inclusion vs. external definitions? The docs don't seem to indicate so... --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith gosmith@ wrote: Flex 2 doesn't support per-component selectors. Put all CSS selectors in the mx:Application, not in MXML components. - Gordon From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Tansht Sent: Thursday, July 20, 2006 1:06 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] CSS type selectors are not supported in components Hi, there I'm experiencing a problem. I've checked FLEX 2 livedoc and found out all styles I defined in an external css files are supported style. However, the warning message CSS type selectors are not supported in components appeared when I run my application. Does any one know how I can resolve it? Thanks in advance David
[flexcoders] Re: Lexical scoping of variable declarations not working?
Ugh. I was hoping you were kidding, but it sounds like a dreadful oversight (and, knowing one of the main authors of the ECMA standard, a truly wizardly experienced guy, SHOCKING -- bad Quux, bad!). Down the road. Bah! [skipping snarky comments about language design here]. I guess we'll have to contort our 2400+ class application to deal with this silliness. Sigh. Thanks Michael for your response!!! --- In flexcoders@yahoogroups.com, Michael Schmalle [EMAIL PROTECTED] wrote: This has been brought up and it's going to be fixed down the road with ECMA. Search the archives for Gordon's response. You won't be able to use var, it's some other weird keyword, I can't remember. Peace, Mike On 1/11/07, Jason Hawryluk [EMAIL PROTECTED] wrote: kind of like you can't do this public function clearTargetData(x:string):void{} public function clearTargetData():void{} which most support also, but I give Adobe the benefit of the doubt this is a completely new flex, built from the ground up, and they have done a bang up job. I can do with out these things, perhaps they'll implement this type of stuff in a later version. jason -Message d'origine- *De :* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la part de* sbyrne_dorado *Envoyé :* jeudi 11 janvier 2007 10:09 *À :* flexcoders@yahoogroups.com *Objet :* [flexcoders] Lexical scoping of variable declarations not working? I'm seeing some odd behavior with the AS3 compiler. I say it's odd because it's at variance with the vast majority of C language derivatives (in fact, I'll go out on a limb and say ALL of them). The behavior I'm seeing is this: If I have package { public class badscope { public function dummy() : void { if (new Date() != null) { var foo : Number = 3; } else { var foo : Number = 4; } } } } the cmopiler is telling me that foo is a duplicate declaration. Um. Every other block structured language I'm familiar with scopes local variable declaration to the enclosing block, so the foo's do not exist in the same lexical scope and there is no conflict. To me, if this behavior of placing all variable declarations in the top level function's scope is in fact the desired behavior, it's a HUGE step backwards. Please help me to understand why I'm seeing the behavior I am, and why it's not breaking lexical scoping rules common to C derivatives. -- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.
[flexcoders] arguments class?
The Flex 2/AS3 docs make it appear that arguments is both a variable, as well as a class. Can anyone clarify this for me? If I want to store arguments away for later usage, what type should I specify (apart from Array, which I *think* will work, tho given that there's not a type inheritance relationship there, it may not)? Steve
[flexcoders] Re: CSS type selectors are not supported in components
I'm getting this error message from within an mx:Application (well a subclass thereof) that includes things via mx:Style source=.../. Is there some salient difference between inline inclusion vs. external definitions? The docs don't seem to indicate so... --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: Flex 2 doesn't support per-component selectors. Put all CSS selectors in the mx:Application, not in MXML components. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tansht Sent: Thursday, July 20, 2006 1:06 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] CSS type selectors are not supported in components Hi, there I'm experiencing a problem. I've checked FLEX 2 livedoc and found out all styles I defined in an external css files are supported style. However, the warning message CSS type selectors are not supported in components appeared when I run my application. Does any one know how I can resolve it? Thanks in advance David
[flexcoders] Re: FileReference Download
My point exactly. --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 08 November 2006 04:05, sbyrne_dorado wrote: https://flexdemos.cynergysystems.com/support/crossdomain.xml .. application in Firefox using HTTPS lives, so you can imagine it's rather important! ;) I get a 404 for that URL :-) -- Tom Chiverton Helping to ambassadorially implement web-enabled meta-services This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Security Sandbox and SWF Loader
Have you found any solution yet? I am banging my head into this problem currently and so far am coming up blank. --- In flexcoders@yahoogroups.com, mindmillmedia [EMAIL PROTECTED] wrote: I have spent the day investigating other options - but I must admit, I have still come up short. Any other ideas? --- In flexcoders@yahoogroups.com, mindmillmedia mindmillmedia@ wrote: I am working on a Yahoo Maps app in Flex 2. Because the Yahoo Maps API doesn't yet fully support Flex 2 - I am making the map (and its API calls) in Flash 8. This Flash file also pulls data from an RSS feed (to make markers on the map). There are no security errors when I run the SWF. However, when I load the SWF into the Flex app, I get security sandbox errors all over the place (for the Map and for the RSS feed - two different domains). I have the following set in the Flex application: Security.allowDomain(domain1.com); Security.allowDomain(domain2.com); _context = new LoaderContext (true, ApplicationDomain.currentDomain, SecurityDomain.currentDomain); yahooMap.loaderContext = _context; I have the following set in the Flash SWF: System.security.allowDomain(domain1.com); System.security.allowDomain(domain2.com); I have the following Cross Domain Policy File: ?xml version=1.0? !-- http://mydomain.com/crossdomain.xml -- cross-domain-policy allow-access-from domain=* / /cross-domain-policy What am I missing? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] File Upload and Cross Domain issues
Hi. I know there is someone who knows the answer. It may be the unreachable Ted Patrick, who claims he knows the answer in his blog, instead of including the solution, has a link that is now dead to the solution. I am hoping that someone else @ Adobe also knows the answer. PLEASE PLEASE PLEASE reply here if you know how to solve the following problem: I am trying to use the fileIO.swf file to provide file upload/download in a Flex application. Works everywhere except Firefox when using HTTPS. I have read that I can do System.security.loadPolicyFile and load a different cross doman policy file, and I have done that, but it does not help. I have tried using: allow-access-from domain=* to-ports=*/ and allow-access-from domain=* / with or without 'secure=false' in both the /crossdomain.xml and in the file I load specifically with loadPolicyFile(). I can clearly see the swf file content seems to be loaded, but when I try to upload I always get an IOError event, which yields no useful information other than the fact that something failed. Can anyone help me? Is this something that Flex just can not handle? Steve -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: FileReference Download
Right here: https://flexdemos.cynergysystems.com/support/crossdomain.xml This apparently the only place in the world where a valid crossdomain.xml that supports using SWFs loaded from a running Flex application in Firefox using HTTPS lives, so you can imagine it's rather important! ;) --- In flexcoders@yahoogroups.com, Carson Hager [EMAIL PROTECTED] wrote: Is there a link on our web site that is not working for you? If that is the case, I will have it addressed immediately. Carson Carson Hager Cynergy Systems, Inc. http://www.cynergysystems.com http://www.cynergysystems.com/ Email: [EMAIL PROTECTED] Office: 866-CYNERGY Mobile: 1.703.489.6466 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sbyrne_dorado Sent: Tuesday, November 07, 2006 3:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: FileReference Download PLEASE expand upon #3. Where *exactly* should this separately loaded cross domain file be, what *exactly* should it contain, how and when *exactly* should it be loaded? Please post an example here (and not possibly breakable link to Cynergy), ok? You will be doing a lot of people a HUGE favor! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Theodore E Patrick ted@ wrote: Just to add to Carson's post: There is a HTTP header corruption bug in Flash Player 8 Release and 8.5.0.133 players that will cause Upload and Download functionality to be limited. This bug has been fixed within 8.5.0.175 player. Here is what doesn't work seamlessly: 1. HTTP AUTH - Authorization Headers will corrupt data exchange. If you upload to an application running within an authorized HTTP session, in some browsers the upload will fail. I have seen this occur in Safari(OSX) and FireFox(Win32). 2. POST Parameters will corrupt data exchange on an Upload request. This is specific to FireFox(Win32) when additional HTTP POST parameters are added into a request. I have seen this occur in Safari(OSX) and FireFox(Win32). 3. HTTPS/SSL usage with FileReference requires a separate loading of a crossdomain policy file for use within the same domain. The FileReference functionality in FireFox(Win32) does not use the FireFox browser to exchange data, instead it uses native Win32 networking. I believe that many of the errors in Firefox are a result of upload and download requests traveling through win32 networking. When using Authorization headers, you will see the Internet Explorer Authorization Security Dialog appear in addition to the Firefox Authorization Security Dialog. The problem is that authorization headers are not shared between Firefox and Win32 Networking. Although you may have Auth session headers in Firefox, when you use upload/download, the header data is lost. Ideally I have found that it is best to use very simple upload logic for compatibility. I typically use URLRewriting to add parameters into the upload url path without the use of GET/POST parameters. I upload to a separate HTTP/HTTPS subdomain and pass a unique token within the upload request url like so: http://upload.myserver.com/upload/29879827342342342 http://upload.myserver.com/upload/29879827342342342 The upload application saves the upload file data if the token exists and expires the token when an upload occurs or within 10 minutes. This methodology seems to work compatibly for all existing browsers and can be adapted to any security model. On the download requests URLRewriting is also very handy. To make sure the filename is returned consistently, I append the name into a URLRewritten request like so: http://upload.myserver.com/upload/2020938409987234/myFile.pdf http://upload.myserver.com/upload/2020938409987234/myFile.pdf In this case, 2020938409987234 is used to obtain a file but the name makes sure that the user will always be presented with 'myFile.pdf' within the FileReference SaveAs Dialog. I have seen several cases where the defaultFileName argument on the download method will fail when POST or GET Parameters are in use. If you call download with the above URL, the name will be myFile.pdf consistently. Please understand that these solutions are not ideal but they work well and I have yet to find a case that could not be adapted into an application. My 2 Cents, Ted Patrick Cynergy Systems, Inc. http://www.cynergysystems.com http://www.cynergysystems.com -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Carson Hager Sent: Wednesday, January 11, 2006 7:47 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[flexcoders] Re: Best Practices: determining if a key is in an Object?
Ah -- hasOwnProperty -- it's not really documented in the 1.5 docs, only mentioned in one place and then as a reserved word that you should not use. But it will do the job that I need -- thanks! I certainly know the difference between undefined and null and how to tell them apart. The case I am trying to deal with is did the client of this component define an attribute called foo? using initObj. I suspect that while foo will be there, if it's bound to a component inline that's not yet been created, it will have the value undefined as well, so the if test probably wouldn't work (but I'm not 100% sure). --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: Not sure about effecient (have some tests at bottom), but the correct way is to use: // notice 3 equals if ( o.prop === undefined) { // does not have prop } else { // DOES have prop } null is a valid value, whereas undefined means the property doesn't exist. hasOwnProperty doesn't look up the prototype chain (aka inheritance chain), so it only checks the current object. Testing in Flash 8, o.prop === undefined averages 2 milliseconds in a function (since local registers are optimized in 7) whereas o.hasOwnProperty(name) averages 4. - Original Message - From: sbyrne_dorado [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 08, 2005 7:44 PM Subject: [flexcoders] Best Practices: determining if a key is in an Object? I'd like to find out what the best (most efficient) way to determine if a given key is present in an object. obj[key] will answer undefined if either there is no key in object, OR if it's value is in fact undefined. I can of course to the potentially expensive for..in and break out if I find the given key I am looking for, but that's not a good solution in general. Any hints? Surely this has to be something AS supports...(?) Steve -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Best Practices: determining if a key is in an Object?
I'd like to find out what the best (most efficient) way to determine if a given key is present in an object. obj[key] will answer undefined if either there is no key in object, OR if it's value is in fact undefined. I can of course to the potentially expensive for..in and break out if I find the given key I am looking for, but that's not a good solution in general. Any hints? Surely this has to be something AS supports...(?) Steve Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] List / DataGrid with growing cells problem
I'm trying to create a List (and then a DataGrid) that can have some cells that grow in height(an actually get additional child elements) in response to some user gesture. I have a custom row renderer and cell renderer, and when I add the child elements the cell does grow, but does so by adding scrollbars instead of asking for more vertical space from it's containment hierarchy. From reading messages #11346 and #11374, it looks like this has been tried before, without resolution. I think that it's got to be something non-obvious but easy, since word wrapping text in a List control does exactly the right thing (grows the cell as needed), so it is doable. Can someone please help me discover the missing piece of the puzzle? Thanks Steve Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Fun with context roots
Unfortunately, we're not yet using Apache. I'm not sure how mod_rewrite would help in this case; can you elaborate your thoughts a bit? --- In flexcoders@yahoogroups.com, James Ward [EMAIL PROTECTED] wrote: This seems like something that could easily be handled by Apache's mod_rewrite. Are you running Apache on your front end web server? How does the redirect from the front end webserver to the app server happen? If you are not running Apache there is probably some trickery you could setup with JSP's. I do not think that this is something that could be done with just Flex though. I think you will need something intelligent on the server side to make the routing decisions. -James On Wed, 2005-06-08 at 21:28 +, sbyrne_dorado wrote: Matt, I'm sorry that I'm not being clear. I'm thinking about your JSP suggestion, and I suppose that would, and would confirm my original premise that Flex has a limitation in this area. Let's see if I can be a little clearer: WEB SERVER: incoming url from browser: http://66.23.45.67/beta/Example.mxml redirects to outgoing to app server:http://192.168.4.110/Example.mxml APP SERVER: can know as a deployment parameter that the external name contains beta. incoming url from web server: http://192.168.4.110/Example.mxml emits some HTML with EMBEDS in it, BUT THIS HTML DOES NOT CONTAIN beta in the URLs that it uses to refer to the Flex servlets. It needs to in order for the calls from the browser to the Flex servlets to be redirected successfully by the Webserver. My assertion is that Flex does not have any support for this situation, and instead REQUIRES that the Webserver NOT rewrite the URLs to remove a context root that's used only for directing traffic at the Webserver. --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: Could you embed the information by generating the MXML using a JSP? I don't remember if you can access the URL that the browser thinks you are hitting from a JSP if it is really a pass-through from another server. The JSP might think it's on the real server (192.168...) and not (foo.bar.com). If not maybe you can do it with Javascript on the HTML page since the url in the address bar should have the right info? Sorry, not much help but I'm still having trouble understanding which pieces of info you have access to, don't have access to, when you would have access to it, and where and when you need that info. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sbyrne_dorado Sent: Thursday, June 02, 2005 11:41 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Fun with context roots I don't think I even get to the state of calling services; the main page (with EMBED, OBJECT, etc) needs to be emitting the pseudo context root beta, because URLs from it that it will use to download the application will need that pseudo context root to get past the web server. --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: What urls are being generated by the server here, named services? If the urls need to be portable can you use relative urls? I can understand that you want a url on one server to redirect to a different url on another server using a different path, but I guess I'm not sure how the context root becomes a problem here. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sbyrne_dorado Sent: Wednesday, June 01, 2005 5:06 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Fun with context roots I am wondering if I've stumbled on a limitation of Flex, or if it's a limitation of my knowledge (probably the latter). Here's the situation: I would like to have the ability to have a web server dispatch to different app servers based on a contex root like path prefix. But, I don't want to have to force each of those app servers to have to have the webapp stored under the same context root that the web server URLs are using. More concretely: On my webserver I want to be able to say http://foo.bar.com/beta/...;, and have the webserver redirect that to the internal app server URL http://192.168.1.1/...;; i.e. no beta context root. Can I do this? I can't seem to get the URLs generated by the server to be the externally visible form of the URLs (i.e. with the beta context root) and not have the app server's context root be beta. Steve Yahoo! Groups Links * To visit your
[flexcoders] Obtaining context root programmatically?
Is there any way within an AS file to find out the current context root? I have discovered that if I use the mx:String element, that the MXML translator will correctly replace @ContextRoot() with the current context root, which is fine, but I am wondering if there is a less hacky way to obtain this information from just ActionScript? [this is all in building a file upload/download pair of components that have to do getURLs to talk to JSP pages and servlets, and thus need to know the context root to correctly sent out the URLs] Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Fun with context roots
I am wondering if I've stumbled on a limitation of Flex, or if it's a limitation of my knowledge (probably the latter). Here's the situation: I would like to have the ability to have a web server dispatch to different app servers based on a contex root like path prefix. But, I don't want to have to force each of those app servers to have to have the webapp stored under the same context root that the web server URLs are using. More concretely: On my webserver I want to be able to say http://foo.bar.com/beta/...;, and have the webserver redirect that to the internal app server URL http://192.168.1.1/...;; i.e. no beta context root. Can I do this? I can't seem to get the URLs generated by the server to be the externally visible form of the URLs (i.e. with the beta context root) and not have the app server's context root be beta. Steve Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] passing variables using getURL?
I'm having problems figuring out how to pass variables using getURL. The documentation that I can find seems to indicate that any random variable that you declare that's in some (unspecified) scope, will be appended (for GET) or passed (for POST) as parameters along with the URL. So I have tried setting some typed local variables and invoking getURL; no luck. No luck with either POST or GET. What's the magic? Do the variables have to be in the top level application? Do they have to be global within the the containing class? Does this functionality even work at all? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Anyone having problems with compc?
I'm trying desperately to produce a SWC that contains a large group of components. I'm experiencing a large number of problems, but the main problem I'm having is that the compiler is producing bad ActionScript! In an unpredictable but repeatable manner (i.e. the same files get hit, but there's no way of knowing what's special about those files), the compiler will produce action script that has multiple members with the same name, such as _resp0_result, or _org_log4f_logging_console_DebugPanel_bindingSetup. When a problem like this occurred in the long past, it usually was related to general problems in the code itself, but this is fully functioning code that compiles and runs correctly when loaded into a Flash player (and compiled on demand) so that doesn't seem to be the situation in this case. Has anyone seen this kind of problem with compc? Is there a known workaround? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Remote object method execution sequence?
I'm trying to understand when a remote method invocation will occur during the execution of an action script method. What I've read so far indicates that it's safe to annotate the PendingCall object returned from the invocation because the invocation [I think it is:] won't occur until the calling method has returned. What I am not clear on is whether it's when the immediately executing method returns, or when the entire method invocation stack returns to the UI event listener loop. Here's an example with numerical time points for illustration: 1: button press happens 2: click handler 'clickHandler' is invoked 3: clickHandler calls 'doRemoteInvocation' 4: doRemoteInvocation calls 'invokeRemote1' 5: invokeRemote1 invokes the actual remote method, decorates the PendingCall returned object 6: invokeRemote1 returns 7: doRemoteInvocation then calls 'invokeRemote2' 8: invokeRemote2 invokes the actual remote method (not the same method that invokeRemote1 invoked), decorates PendingCall object 9: invokeRemote2 returns 10: doRemoteInvocation returns 11: clickHandler returns 12: button click pressing completes What I am guessing happens (based on the statement that there's pretty much only 1 thread running in Flex) is that only at time 12 or after do the actual remote method invocations occur. The documentation that I have read sort of seems like the remote invocations happen at 6 and 9. I'd like to be able to count on them not happening until after 10 at least Any help would be greatly appreciated!!!
Lifetime of _global vs Application.application
Which has the longer lifetime: _global or Application.application; i.e. if I were to cache some information for as long as possible, which of these locations is the better choice? I would think that _global would be, as I believe the current application can be replaced programmatically, right? Steve
Re: Lifetime of _global vs Application.application
Just so I'm clear, you're saying that under no circumstances will the singleton class be removed? Programmatic replacement of the top level application won't discard this singleton? And the replaced application when it refers to the singleton class will be referring to the exact same class (and thus singleton)? --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: I think rather than storing things directly on the application or on _global I'd recommend using a singleton class. That way you can control things a little better programmatically but still have the static reference which will exist for the life of the app.
callback execution environment?
I'm trying to understand the environment that a call back function is executing in. I have called a remote object from ActionScript, via var call = remoteObject.myFunc(); Then I set a result handler function on the returned PendingCall instance: call.onResult = myFunc; But when myFunc gets invoked, it gets passed in the result of the remote object method invocation (expected) but does not seem to be executing in the context of the invoking object, i.e. the value of this is not what was present when I invoked remoteObject.myFunc(). I thought about annotating the PendingCall object with this in some random property, but that doesn't help me since when myFunc is invoked it is not being given the PendingCall instance. Is there any way to have myFunc obtain the correct value for this? Steve
Almost read-only client side cache
In the application that we're developing, there is a significant amount of state that the client side RIA uses that changes very slowly. By very slowly I mean it may not change for a month, may go through a few days where it changes more frequently, and then goes dormant again. Rather than downloading this state each time the client side Flex application is started, it would be useful to somehow persistently cache that state on the client side. I'm looking for advice as to what the best practice for addressing this need is. I can imagine a couple of possibilities, but I'm sure there are better choices available: 1) arrange for the state to be written out on the server side when it changes in the form of ActionScript classes or .mxml files, and integrated into the core application somehow. When the user starts the application the next day, Flex notices that the application has changed on the server side and re-downloads it. This can be a pretty big hit if the application is large (which ours is likely to be). 1a) A variant of 1, where the generated .as or .mxml file is not incorporated into the main application directly, but is loaded using some kind of deferred loading mechanism. 2) Using some client side storage mechanism, such as SharedObjects, plus some versioning scheme. On startup a quick request or series of requests to check for updates to the cached state is made, and any available updates are loaded. This has the limitation of only allowing 100k worth of state (w/o prompting the potentially naive user) -- this may be sufficient, but it may not. Moreover, whether it will be sufficient or not may depend on the needs of our customers, and may not be something we can predict in advance. Can anyone suggest other options for achieving this goal? Steve