[flexcoders] Help trying to create a slightly complex border.
I'm trying to create a postage stamp like border - which would look like a border of overlapping circles - and am having issues. I want a constant fill and line/stroke style for all elements of my border. I was using degrafa to do this using circles and repeaters but couldn't get a single stroke around the edge of all the circles - so I thought I'd do it directly in AS3 to see if that was faster, however I have the following problems. First I tried doing it using circles, if I try setting the fill and line styles and then doing circles I get: - Blank gaps in the fill where the circles overlap - can I (and if so how do I tell it to) combine these circles into a single shape? - A border around each individual circle - rather than the shape as a whole. So I figured I was doing it wrong and took a look at curveTo() and drawPath() to try and draw a single object - but didn't have much luck with those either as I found it difficult to figure out how to use these for my desired result. The variables I'm working with is radius, circleOffset (the amount each circle is offset from the previous one), xCircles and yCircles (the calculated number of circles for the top bottom and left right respectively). Any help would be greatly appreciated.
[flexcoders] Getting progress of a POST operation (HTTPService or any other way)?
Is it possible to get the progress (or at least bytes sent) for a POST operation in any way, I'm currently using HTTPService but will happily change to something else if it will give me the ability to track the progress of the POST.
[flexcoders] Finding size of a DropShadowFilter (or other BitmapFilters)
I'm trying to determine the width of pixels that the DropShadowFilter is adding to my component when I'm trying to save the BitmapData (including the drop shadow) - is there some easy to get that or would I have to calculate it myself based on the filters settings (angle, blur, etc.)
[flexcoders] Issues trying to create a custom image component
I'm trying to create a custom image component so that I can have it with a border and rounded corners. I tried doing it by just extending the image component, but quickly found that it was a bit more difficult than I expected within the image component - as I couldn't figure out how to move the image itself around when drawing the border. So the second solution I came up with was as follows: * A custom component which has a child as the image * The image has a mask applied * The border is drawn using the custom components graphics This all works out pretty much OK, except for two issues: 1) The child image is only ever displayed if the custom component extends the Canvas component. 2) Resizing of the component does not work in the same way as resizing an image component - e.g. if you set a width on an image component then the image is scaled appropriately. With me extending the Canvas I just get scroll bars. The code for the component can be found here on pastie: http://pastie.org/326072 Any ideas are greatly appreciated.
[flexcoders] Re: Issues trying to create a custom image component
I've just this to updateDisplayList: if(image) { image.scaleX = this.scaleX; image.scaleY = this.scaleY; image.scrollRect = this.scrollRect; } It means I have to manually scale the thing using scaleX scaleY rather than using maxWidth maxHeight, but it is more in line with how I wanted it to work.
[flexcoders] Runtime exception handling, what's your method?
I'm about to embark on my third real Flex app and something I'm still not happy with is my handling (or lack of) of run time exceptions. Previously I've setup a logging target to log to the backend any strange/very rare exceptions that I can think of within my code. However the lack of a catch-all solution for those totally un-expected exceptions (which sneak through but are of course the worst kind) is something that I really miss from my previous (non Flex/flash) projects where I've had the ability to have a catch-all solution to wrap the entire application. I just wondered how other people were handling this, if at all? As no-one likes it when an error occurs and you don't know about it without someone telling you about it -- it's even worse if it kills the app.
[flexcoders] Re: Repeater items with two states and dataProvider binding resetting state
One thing that can help in this kind of situation is not to bind, but to explicitly set the dataProvider. Won't that also cause the repeater to refresh, or are you saying to find the child of the repeater and set its data to the data that is updated? This is what I was thinking of trying but I assumed I'd get the same issue.
[flexcoders] Repeater items with two states and dataProvider binding resetting state
I have a Repeater which is repeating an item with two states (an open state and a closed state), when I open one one of the items I then load some extra data in. When the extra data is loaded the item in the data provider (an array collection) is replaced - that way everything is updated via the bindings. The problem I have is that when the array collection binding fires the Repeater recreates/refreshes each of the items so any that were open close, which is, of course, not what I want. I'll probably have to code this all up myself without using the Repeater, but I wondered if anyone else had any thoughts before I start down that path.
[flexcoders] Getting HTTP status code with HTTPService
I've been digging through the documentation and debugged the HTTPResultEvent but I can't see anyway to get the HTTP status code using HTTPService, am I wrong is there some way to get it?
[flexcoders] Re: Deep Linking Problems
I haven't had any issues with browsermanager/deep linking either, but I've not gotten to the stage where I really thrash it via testing. As mentioned earlier the other alternative is to use SWFAddress, here is an implementation that allows you to use your existing browser manager code with SWFAddress (http://developer.iconara.net/objectlib/flex-browsermanager-swfaddress.html) I haven't tested that yet though. --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Monday 28 Apr 2008, Brad Keck wrote: -URLs failing to update with setFragment() I've seen this when an exception was thrown from the code that does it. -The back button not changing the URL after a setFragment() -The forward button not being enabled after a successful back button Ditto. success with deep linking. Is it simply a buggy feature of Flex at this point, or am I really an inept as I seem? :) Are there any It seems to work fine here. -- Tom Chiverton Helping to administratively market end-to-end synergies on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Custom Cursors causing slowdown
Just getting back to this, would you recommend upping the framerate on the application then or just put up with the slow cursors. I'm just conscious that upping the framerate will up the CPU usage slightly with Flex but I haven't seen much research into how much difference it will make. --- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: I wondered if anyone else had experienced similar issues? What you're seeing is your app's actual framerate. Nothing is going slower. Here's why... If you don't specify any custom cursors, Flash just uses the OS's cursor and let's the OS do its standard thing of drawing it (which all modern OS's do as a very high priority process, usually part of the video driver, so that the mouse is always responsive). When you specify a custom cursor, the Flash Player actually does something tricky (some may say hacky!). It hides the OS cursor (when the mouse is over the Flash Player) and instead moves a DisplayObject around the stage tracking the mouse's position. So, with the default cursor you're using the OS to draw the cursor; with any custom cursors, you're using the Flash Player API to draw it. The most obvious effect (if you're app is not performance intensive) is that the mouse will only update at your app's framerate, which for Flex defaults to 24fps (much lower than any modern OS's mouse refresh). Personally, I think Adobe should provide a cursor API that's implemented as a native OS cursor (provide a bitmap of a fixed resolution, for example). At a minimum, I think the Flash Player should expose a collection of native cursors that map to the browser's native cursors. It's rather irritating that I have to track down and embed a hand-grab image, a resize image, etc., in order to have what are virtually universal cursors under any OS (and mine won't match the OS!). This is one area where AJAX apps are superior. Troy.
[flexcoders] Get actual size of a canvas (the internal size)
I know I've done this before, but I can't remember where and trawling through the documentation isn't helping me. Basically I want to add something to a Canvas that is a 100% of it's internal size - so as the Canvas grows to add children (as scrolling is enabled) I want my child to still be 100% the size of the Canvas' internal area. If I set it's percentWidth percentHeight to 100 then it just sizes up to the displayed portion of the canvas, same goes for the unscaledWidth unscaledHeight values passed to updateDisplayList() they appear to be the visible dimensions of the Canvas. What I need is the width + it's scroll, so that's why I'm calling it the internal size of the Canvas. I've looked at CanvasLayout but I don't think that really helps me as the layout object is private to the Canvas. Any ideas are greatly appreciated.
[flexcoders] Re: Get actual size of a canvas (the internal size)
I had a bit of an epiphany after posting this first message, I still don't think this is right but here's what I'm doing: 1. Add my child with includeInLayout set to false to not cause the parent Canvas to use it in it's layout calculations (otherwise will cause problems in step 2). 2. In updateDisplay list update the child with: child.width = unscaledWidth + this.maxHorizontalScrollPosition; child.height = unscaledHeight + this.maxVerticalScrollPosition; Like I say, not perfect but it seems to be working - if there is anything better I'd love to hear about it - like I say I'm pretty sure I got this before somehow (and I know it wasn't the above hack). --- In flexcoders@yahoogroups.com, dave_defusion [EMAIL PROTECTED] wrote: I know I've done this before, but I can't remember where and trawling through the documentation isn't helping me. Basically I want to add something to a Canvas that is a 100% of it's internal size - so as the Canvas grows to add children (as scrolling is enabled) I want my child to still be 100% the size of the Canvas' internal area. If I set it's percentWidth percentHeight to 100 then it just sizes up to the displayed portion of the canvas, same goes for the unscaledWidth unscaledHeight values passed to updateDisplayList() they appear to be the visible dimensions of the Canvas. What I need is the width + it's scroll, so that's why I'm calling it the internal size of the Canvas. I've looked at CanvasLayout but I don't think that really helps me as the layout object is private to the Canvas. Any ideas are greatly appreciated.
[flexcoders] Re: Custom Cursors causing slowdown
Thanks for that great explanation. Your issues about not supporting the native OS cursors and thus having to track down your own (which then don't match the native OS) also bothered me I'd like to see support of at least the minimum set of cursors defined in CSS2 via the flash player. On that thought I was just wondering if it was possible to use the ExternalInterface to do this? By maybe setting a classname on the Flash object via JavaScript... hm -D --- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: I wondered if anyone else had experienced similar issues? What you're seeing is your app's actual framerate. Nothing is going slower. Here's why... If you don't specify any custom cursors, Flash just uses the OS's cursor and let's the OS do its standard thing of drawing it (which all modern OS's do as a very high priority process, usually part of the video driver, so that the mouse is always responsive). When you specify a custom cursor, the Flash Player actually does something tricky (some may say hacky!). It hides the OS cursor (when the mouse is over the Flash Player) and instead moves a DisplayObject around the stage tracking the mouse's position. So, with the default cursor you're using the OS to draw the cursor; with any custom cursors, you're using the Flash Player API to draw it. The most obvious effect (if you're app is not performance intensive) is that the mouse will only update at your app's framerate, which for Flex defaults to 24fps (much lower than any modern OS's mouse refresh). Personally, I think Adobe should provide a cursor API that's implemented as a native OS cursor (provide a bitmap of a fixed resolution, for example). At a minimum, I think the Flash Player should expose a collection of native cursors that map to the browser's native cursors. It's rather irritating that I have to track down and embed a hand-grab image, a resize image, etc., in order to have what are virtually universal cursors under any OS (and mine won't match the OS!). This is one area where AJAX apps are superior. Troy.
[flexcoders] Re: Custom Cursors causing slowdown
Yeah it'd be nice if we could get hold of them and then maybe we could put together a cross browser/cross OS facade for using the default custom cursors that are defined in CSS 2 - at least that way they wouldn't stand out too much. --- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: On that thought I was just wondering if it was possible to use the ExternalInterface to do this? By maybe setting a classname on the Flash object via JavaScript... hm Already tried that (there's another thread where I raise this issue). The Flash Player dictates it's own cursor and CSS doesn't seem to apply. I thought it was a brilliant idea for a hack, though! I was wondering if anyone knew of an official source of browser cursors, say what Firefox uses across platforms (though they just may be the native equivalents). CSS references always contain example images, but I'm unsure about just snagging those for legal reasons. Googling didn't really provide anything useful. Troy.
[flexcoders] Re: Custom Cursors causing slowdown
Here's a gallery of the default cursors for Windows (IE Firefox) for the various CSS properties: http://webdesign.about.com/od/styleproperties/ig/CSS-Cursors-Gallery/ --- In flexcoders@yahoogroups.com, dave_defusion [EMAIL PROTECTED] wrote: Yeah it'd be nice if we could get hold of them and then maybe we could put together a cross browser/cross OS facade for using the default custom cursors that are defined in CSS 2 - at least that way they wouldn't stand out too much. --- In flexcoders@yahoogroups.com, Troy Gilbert troy.gilbert@ wrote: On that thought I was just wondering if it was possible to use the ExternalInterface to do this? By maybe setting a classname on the Flash object via JavaScript... hm Already tried that (there's another thread where I raise this issue). The Flash Player dictates it's own cursor and CSS doesn't seem to apply. I thought it was a brilliant idea for a hack, though! I was wondering if anyone knew of an official source of browser cursors, say what Firefox uses across platforms (though they just may be the native equivalents). CSS references always contain example images, but I'm unsure about just snagging those for legal reasons. Googling didn't really provide anything useful. Troy.
[flexcoders] Custom Cursors causing slowdown
I'm experience an odd situation where when I have added a custom cursor the mouse movement is noticeably slower (although not massively obvious - although a colleague did point it out while testing the app). I've looked through my code and put traces everywhere and nothing is being called excessively that would cause the slowdown during this part of the app. Also if I remove just the custom cursor setting code then everything is fine and dandy. I'm running on the latest debug player on OS X, I can't say I noticed it when I was working on Windows - but then again I hadn't noticed it until my colleague pointed it out. I wondered if anyone else had experienced similar issues?
[flexcoders] Re: View stack not changing in display even though index changes (first time onl
It definitely is some sort of race condition but the thing that is confusing me is the fact that it's reporting that the selected index and the selected child are those that I'm expecting but the display is wrong. I've tried adding a validateNow() call before the change but that hasn't made much difference. I'm gonna have to look at my code to figure out a better way for me to control when this is called, but it really doesn't make much sense to me why the viewstack is reporting that it's got everything selected as expected but no matter how much I try to force it to update (by calling validateNow or invalidateDisplayList etc.) it doesn't seem to want to show the correct selected index the first time after the component is loaded. -D --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Sounds like timing. If you have a button you click to change it, will it change the first time? If so, a validateNow() before you change the value might help. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dave_defusion Sent: Saturday, April 12, 2008 6:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] View stack not changing in display even though index changes (first time only) I have a view stack setup as a custom component, in it there is a property call displaySection which is an int that corresponds to the index to set the view stack. This is so that I can then use constants for each of the sections external to the view and not worry about the implementation within the view. It is something like follows: mx:Viewstack ... selectedIndex={displaySection} ... public static const SECTION_ONE:int = 0; (etc.) ... [Bindable] public var displaySection:int = SECTION_ONE; ... /mx:Viewstack If I then change the displaySection externally and trace out the selectedIndex and selectedChild of my component both are as expected, however the very first time I do this without fail the display does not change and the section displayed is always the default one. However if I try and do it again then everything works fine. I've tried swapping out the displaySection variable for a setter and removed the binding and made the selectedIndex/selectedChild change happen within commitProperties() and have traced out the initialized property of my view and the length of the children and everything is always as I expect it to be. However still no matter what I try without fail on the first attempt to change the displaySection it never works (always does thereafter --- but with nothing discernibly different in the trace). I've also tried changing the creationPolicy on the viewstack (and all the viewstack children) to all, which didn't make any difference. I've run through the debugger also and everything appears to be fine. I'm really stuck and I'm ready to throw my computer out of the window. Any ideas are greatly appreciated.
[flexcoders] Re: View stack not changing in display even though index changes (first time onl
So my fix is as follows: 1. Remove the binding 2. In commit properties: if( this.initialized ) { this.selectedIndex = this._displaySection; } 3. In creation complete handler add call to invalidateProperties(); --- In flexcoders@yahoogroups.com, dave_defusion [EMAIL PROTECTED] wrote: It definitely is some sort of race condition but the thing that is confusing me is the fact that it's reporting that the selected index and the selected child are those that I'm expecting but the display is wrong. I've tried adding a validateNow() call before the change but that hasn't made much difference. I'm gonna have to look at my code to figure out a better way for me to control when this is called, but it really doesn't make much sense to me why the viewstack is reporting that it's got everything selected as expected but no matter how much I try to force it to update (by calling validateNow or invalidateDisplayList etc.) it doesn't seem to want to show the correct selected index the first time after the component is loaded. -D --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: Sounds like timing. If you have a button you click to change it, will it change the first time? If so, a validateNow() before you change the value might help. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dave_defusion Sent: Saturday, April 12, 2008 6:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] View stack not changing in display even though index changes (first time only) I have a view stack setup as a custom component, in it there is a property call displaySection which is an int that corresponds to the index to set the view stack. This is so that I can then use constants for each of the sections external to the view and not worry about the implementation within the view. It is something like follows: mx:Viewstack ... selectedIndex={displaySection} ... public static const SECTION_ONE:int = 0; (etc.) ... [Bindable] public var displaySection:int = SECTION_ONE; ... /mx:Viewstack If I then change the displaySection externally and trace out the selectedIndex and selectedChild of my component both are as expected, however the very first time I do this without fail the display does not change and the section displayed is always the default one. However if I try and do it again then everything works fine. I've tried swapping out the displaySection variable for a setter and removed the binding and made the selectedIndex/selectedChild change happen within commitProperties() and have traced out the initialized property of my view and the length of the children and everything is always as I expect it to be. However still no matter what I try without fail on the first attempt to change the displaySection it never works (always does thereafter --- but with nothing discernibly different in the trace). I've also tried changing the creationPolicy on the viewstack (and all the viewstack children) to all, which didn't make any difference. I've run through the debugger also and everything appears to be fine. I'm really stuck and I'm ready to throw my computer out of the window. Any ideas are greatly appreciated.
[flexcoders] Re: View stack not changing in display even though index changes (first time onl
Actually that didn't fix it either, I then had the strange situation of two of the children showing at the same time in the viewstack. The (hopefully final) fix I have now is to not have the Viewstack be the root component in my custom component, now I have a Canvas as the root in the custom component. Although this is a pointless container in my case it does seem to fix the issue and even meant I could revert to the binding I was first attempting to use. To me this looks like there could be an issue with using a Viewstack as the root of a custom component in some situations. -D --- In flexcoders@yahoogroups.com, dave_defusion [EMAIL PROTECTED] wrote: So my fix is as follows: 1. Remove the binding 2. In commit properties: if( this.initialized ) { this.selectedIndex = this._displaySection; } 3. In creation complete handler add call to invalidateProperties();
[flexcoders] View stack not changing in display even though index changes (first time only)
I have a view stack setup as a custom component, in it there is a property call displaySection which is an int that corresponds to the index to set the view stack. This is so that I can then use constants for each of the sections external to the view and not worry about the implementation within the view. It is something like follows: mx:Viewstack ... selectedIndex={displaySection} ... public static const SECTION_ONE:int = 0; (etc.) ... [Bindable] public var displaySection:int = SECTION_ONE; ... /mx:Viewstack If I then change the displaySection externally and trace out the selectedIndex and selectedChild of my component both are as expected, however the very first time I do this without fail the display does not change and the section displayed is always the default one. However if I try and do it again then everything works fine. I've tried swapping out the displaySection variable for a setter and removed the binding and made the selectedIndex/selectedChild change happen within commitProperties() and have traced out the initialized property of my view and the length of the children and everything is always as I expect it to be. However still no matter what I try without fail on the first attempt to change the displaySection it never works (always does thereafter --- but with nothing discernibly different in the trace). I've also tried changing the creationPolicy on the viewstack (and all the viewstack children) to all, which didn't make any difference. I've run through the debugger also and everything appears to be fine. I'm really stuck and I'm ready to throw my computer out of the window. Any ideas are greatly appreciated.
[flexcoders] Trace stopped working
I had trace setup and working fine, then I ran the Profiler (okayed the default options that the profiler had given me) from Flex Builder and now the flash player doesn't trace to a file. I've tried un-installing and re-installing the Flash debug player, removing and re-creating the mm.cfg file etc. etc. All the trace output does show up in Flex Builder console if I debug the app - but this is not as handy as tracing to the log file. Any ideas?
[flexcoders] Re: Global keyboard capture?
Thanks to this thread I've not bashed my computer to death today, I was getting close. I was having the same issue where after a given action the key up/down event handlers that I'd registered on the systemManager were no longer being triggered. What I was doing was this: Elsewhere within the app something else (who had a child which I'd explicitly given focus to via setFocus()) would get removed from the display (and left for G.C. to pick up) on a keyDown event. At this point the event handlers registered to the systemManager stopped picking anything up. It turns out that simply removing the item from the display doesn't release the focus, so I've manually given focus to the parentApplication when I remove it. This smells to me, am I doing anything wrong or is the behaviour you'd expect of focusing? Anyway I wouldn't have gotten to the bottom of the issue without this thread -- so many thanks.
[flexcoders] itemRollOver and itemDoubleClick not firing on datagrid
I can't figure out why this isn't working, I thought I was missing something silly on Monday so didn't look at it all day yesterday in the hope that a fresh view would show me the issue but I really can't see what's going on. Here's what I have: mx:Script ![CDATA[ import mx.events.ListEvent; private function doRollOver( event:ListEvent ):void { trace( 'ROLL' ); } private function doClick( event:ListEvent ):void { trace( 'CLICK' ); } private function doDoubleClick( event:ListEvent ):void { trace( 'DOUBLE CLICK' ); } ]] /mx:Script ... mx:DataGrid id=tasksGrid width=100% height=100% dataProvider={tasksData} itemRollOver=doRollOver(event); itemClick=doClick(event); itemDoubleClick=doDoubleClick(event); ... /mx:DataGrid I'm compiling with Flex 2.0.1 and the only think that I can get to fire in the above example is the itemClick event. I have tried adding the listeners via actionscript (within the creation complete) but that makes no difference. I'm really not sure why this isn't working. Any suggestions are greatly appreciated.
[flexcoders] Re: itemRollOver and itemDoubleClick not firing on datagrid
--- In flexcoders@yahoogroups.com, Danny Gold [EMAIL PROTECTED] wrote: For the list components you have to set doubleClickEnabled=true in order for them to dispatch doubleClick events Oh yeah, I always forget about that one. So that's the doubleClick sorted, the itemRollOver still doesn't work, is there anything similarly easy that I'm missing to get that working?
[flexcoders] Re: itemRollOver and itemDoubleClick not firing on datagrid
I just added a handler for itemRollOver in one of my DataGrids and it worked. Are you using Item Renderers in your DataGrid or any other special case? I'm using an item renderer, but I tried removing that earlier and that didn't do anything. The data grid is nested within an accordion which is inside a SuperTabNavigation but I'm not sure either of those are special cases.
[flexcoders] Re: Is setting custom headers on HTTPService for a GET possible?
Yeah this is the case with Flex, I think it has something to do with the flash player (but don't quote me on that) -- I'm sure this question will have been asked on here many times before so maybe you can find a more detailed answer. HTTPService definitely has some idiosyncrasies such as if you don't include a request object then all requests are sent as GET, and sometimes when you do set a request object requests are sent as either GET or POST (based on the contentType set on the service). The fact that all these idiosyncrasies aren't documented makes it very frustrating to work with HTTPService sometimes -- and like I said it's probably more down to the flash player than Flex's HTTPService. I myself am trying to figure out how I can add to or override the Accept header but haven't had much luck. -D --- 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{
[flexcoders] Re: Is it possible to have a dynamic services/channel/endpoint URI?
Seems I was being a little dense yesterday, I tried setting the URI of the endpoint to just URI=/rubyAMF/gateway (note: no http://domain/) and it works fine. Obvious. -D --- In flexcoders@yahoogroups.com, dave_defusion [EMAIL PROTECTED] wrote: The backend portion of my app is setup the handle accounts automatically via an account key (which is currently set via the subdomain), e.g.: accountA.test.com will be restricted to accountA accountB.test.com will be restricted to accountB etc. I'm going to be putting a Flex frontend on all of this using AMF, but I can't figure out what to do with my service/channels as I don't really have a single endpoint URI - as it will be different for each account. Is there anyway to make the endpoint URI dynamic? The only other thing I can think of would require a massive amount of refactoring on the backend (which is nearly complete) to have it sited at: app.test.com And accounts handled via: app.test.com/accountA/ will be restricted to accountA app.test.com/accountB/ will be restricted to accountB Dynamic endpoints would be the easiest and cleanest solution.
[flexcoders] Re: Is it possible to have a dynamic services/channel/endpoint URI?
I didn't know that you could use those placeholders in the URI, do you know of any documentation on these - I can't seem to find any. Although I've found a few examples which mention these 3 {server.name} , {server.port}, {context.root} - is that all there are (not that I need any more)? Also I assume that is the preferred method of handling the URI (rather than my rooting URI hack). -D --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Monday 11 Feb 2008, dave_defusion wrote: Seems I was being a little dense yesterday, I tried setting the URI of the endpoint to just URI=/rubyAMF/gateway (note: no http://domain/) Note, this is where you can use {server.name} (etc.) to have the Player interpolate the URI at run time. -- Tom Chiverton
[flexcoders] Is it possible to have a dynamic services/channel/endpoint URI?
The backend portion of my app is setup the handle accounts automatically via an account key (which is currently set via the subdomain), e.g.: accountA.test.com will be restricted to accountA accountB.test.com will be restricted to accountB etc. I'm going to be putting a Flex frontend on all of this using AMF, but I can't figure out what to do with my service/channels as I don't really have a single endpoint URI - as it will be different for each account. Is there anyway to make the endpoint URI dynamic? The only other thing I can think of would require a massive amount of refactoring on the backend (which is nearly complete) to have it sited at: app.test.com And accounts handled via: app.test.com/accountA/ will be restricted to accountA app.test.com/accountB/ will be restricted to accountB Dynamic endpoints would be the easiest and cleanest solution.
[flexcoders] Accordion, the FlexEvent.SHOW isn't fired the first time a panel is shown
I'm trying to add something into a panel in an accordion, I'm using the FlexEvent.SHOW to add the contents once the panel is displayed (this works pretty much everywhere else - e.g. a tab navigator). In my case trying to add the contents to a non visible element doesn't work (as I'm trying to get bitmap data), so I have to wait until they're visible before I can add my stuff. But in the Accordion it appears the FlexEvent.SHOW isn't fired the first time a panel is shown (the event listener added to the VBox that wraps panels content) -- it's fired the second time the panel is shown but never on the first time. I've tried listening for FlexEvent.INITIALIZE but that seems to be firing a little too early for what I'm doing. Basically all I need to know is as soon as a given panels content is displayed. I'd like a one solution fits all so for tab navigators etc. I only want to add my content when a non visible element becomes visible, but failing that I can add a specific workaround (if it's possible) to make it handle accordions different. Any ideas? Hope that makes sense. -D
[flexcoders] Re: Vertical scrolling without horizontal scrolling? How do I make 100% == 100%
Setting minHeight (everywhere I've already defined minWidth) doesn't resolve the issue either.
[flexcoders] Re: Vertical scrolling without horizontal scrolling? How do I make 100% == 100%
I too have been having problems with 100% widths and unwanted horizontal scrollbar. I've tried adding minWidth=0 to everything that has a width of 100% but that hasn't fixed the problem that I get an unwanted horizontal scrollbar. I've also tried using the reflex util (http://code.google.com/p/reflexutil/) to change these properties at run time to try and figure out what is causing the problem. What I (basically) have is the following: - (1) Tab navigator - 100% width -- (2) VBox (Tab contents) - 100% width --- (3a) Text --- (3b) HBox - 100% width --- (3c) Tab navigator - 100% width I get the vertical and horizontal scrollbars on the outer tab navigator (1) whenever the content gets taller than the app, in this case I obviously want vertical scrollbars and no horizontal scrollbars. With the reflex util I can change the width of the tab contents children (3a,3b,3c) and I still have horizontal scrollbar. However I cannot change the width of the VBox that wraps the tab contents (2) - it simply keeps resetting to the current value every time I try. I can see that it is the VBox (2) which is overlapping the vertical scrollbar (and thus causing the horizontal scrollbar) using reflex util. So I'm really stumped, I either need a solution to this, or a way to move the scrollbars from the tab navigator (1) to the VBox (2). Any advice would be greatly appreciated. -D
[flexcoders] Re: Adding custom events to the pre-loading sequence
rudmonster, an example would be good as I've not been able to announce custom events from the app that the preloader seems to see, unless I use the previous suggestion. My solution to preload the stylesheets was to do it within the preloader itself so have a 2 step preload, only once both steps were completed did I announce the complete event. -D --- In flexcoders@yahoogroups.com, rudmonster [EMAIL PROTECTED] wrote: Hello, I posted an answer this morning but I dont see it so let me try again (first time posting :) All you need to do is extend mx.preloader.Download progressbar then override the FlexEvent.INIT_COMPLETE you can then control when your preloader will end ...see here (sorry ...I am paraphrasing my code dont have it with me but you will get the idea) public class Preloader extends DownloadProgressBar { public var splash:SplashScreen; public function CustomPreloader() { super(); splash = new splashScreen(); this.addChild(splash) ; } override public function set preloader( preloader:Sprite ):void { preloader.addEventListener( FlexEvent.INIT_COMPLETE , FlexInitComplete ); } private function FlexInitComplete( event:Event ):void { splash.comp= true; // When this is true I know that the swf has finished downloading dispatchEvent( new Event( Event.COMPLETE ) ); } } so over riding and binding a var to true I can use another event (like a database query result event to call another function inside of my splash sprite .as file to remove itself like this: public function startupComplete( event:ResultEvent):void { if( this.comp) closeSplash() ; } public function closeSplash( ):void { if( this.alpha 0){ this.alpha = this.alpha - fadeOutRate; this.parent.removeChild(this); } } if this sounds like what you want I can send you all my code to do this . Rudmonster :) --- In flexcoders@yahoogroups.com, hannes.stockner mail@ wrote: Now I have a possible solution: CustomPreloader: private function onFlexInitComplete(event:Event):void { //now we can access the Application.application Application.application.addEventListener(AppReadyEvent.READY, onAppReadyEvent); } private function onAppReadyEvent(event:AppReadyEvent):void { dispatchEvent(new Event(Event.COMPLETE)); } Application: //dispatch AppReadyEvent if you want remove the preloader Application.application.dispatchEvent(new AppReadyEvent(AppReadyEvent.READY)); What do you think about it? --- In flexcoders@yahoogroups.com, dave_defusion david.spurr@ wrote: I'm just trying to do the same thing for our app today and there must be a way, surely it's quite a common requirement. All I want to do is load the runtime styles a quick check to the backend, but the loading the styles is the most important thing.
[flexcoders] Re: Adding custom events to the pre-loading sequence
I'm just trying to do the same thing for our app today and there must be a way, surely it's quite a common requirement. All I want to do is load the runtime styles a quick check to the backend, but the loading the styles is the most important thing.
[flexcoders] Modules + CSS issues, what are recommend practices
We have an application with each core section of the application being a module (as some users will get access to a restricted set of the app sections). We have all the CSS declared (via mx:Style source=... / tags) in the application MXML file. We then compile using a link report to optimize each of the modules for our application and everything seems to work fine. However now the application is nearly finished we just started to really skin the application (we started with the OSX stylesheet from scalenine and tweaked from there) everything looked ok until we noticed some oddities. The things we noticed were that you could click on a textarea within a module but you couldn't type into it and wherever date choosers are used we got the OSX style chrome on the date chooser but couldn't see nor choose any dates. Removing the OSX stylesheet fixed both of these problems. I tried tweaking the OSX stylesheet but that did not resolve the problem the only thing that I did which resolved all these strange issues was to include the OSX stylesheet within each of the modules themselves. I know I get a few warnings when compiling stating that certain CSS declarations aren't going to be evaluated, but the fact that the styles for things like the date chooser are in the app when the CSS is only in the main application is really confusing.
[flexcoders] Re: Using Tweener for effect (such as showEffect)
Well that was a simple example, the great thing about tweener is that it can tween multiple properties all at once, without me having to create a Parallel effect and lots of other effects. -D --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 28 Nov 2007, dave_defusion wrote: this.setStyle( 'showEffect', this.testShowEffect ); private function testShowEffect ():void { trace( 'testShowEffect ' ); Tweener.addTween( this, { y: this.height, time: 1 } ); } Why not use the built in Resize effect ?
[flexcoders] Embedded asset management strategy
In my current project I'm going to be use a handful of icons in quite a few different classes. I was planning on embedding each of these into the application and was thinking that a single class with static properties would be the best way to go. For example if I had a IconAssetManager class which then handled the embedding of each of the icons and then everything that needs to use the icons can reference them from that single point. So I'm basically asking for a sanity check or any suggestions, has anyone else had experience of doing this? Also if I embed an image in more than one place (say as variables of each class that uses them) then I'm assuming that the image will be embedded multiple times into the .swf, is this assumption correct? Thanks in advance, -D
[flexcoders] Using Tweener for effect (such as showEffect)
I would like to use the Tweener class for my showEffect hideEffect, however with Tweener whenever you add a tween it kicks off straight away. I tried doing my tween inside a method and using that as the effect e.g.: this.setStyle( 'showEffect', this.testShowEffect ); private function testShowEffect ():void { trace( 'testShowEffect ' ); Tweener.addTween( this, { y: this.height, time: 1 } ); } But that method doesn't get called when I change the visible to true. Any ideas? -D
[flexcoders] Re: Flex Builder 3 Gotcha
Thanks for the tip! I had this happen to me (about the fourth file it has happened on) once again this morning, but I long ago resolved myself the the fact that I had to live with it (at a lower productivity rate when working with that file) as I had tried most things I could think of (even deleting the file in Flex Builder and creating a new file with the same name didn't fix the issue). Your workaround worked perfectly first time, thanks again.
[flexcoders] List itemRenderer based on VBox error when verticalGap
I'm using the latest Flex 3 Beta SDK and I've just created an itemRenderer based on a VBox which I'm using in a List. Everything is fine until you scroll down and then back up to the top, if you do this the first item height will have shrunk and it will never resize. I tried overriding the measure() method but that didn't fix it, but I did notice that if I removed the verticalGap on the VBox that fixed the issue. I'm not sure if this is a known issue or not (haven't tried with Flex 2), but I could do with a workaround for when a verticalGap is applied (without adding extra containers) if anyone has any thoughts. -D
[flexcoders] Re: List itemRenderer based on VBox error when verticalGap
Actually now it seems the verticalGap isn't exactly the problem - I thought removing that fixed the issue but it hasn't, just made it appear 50% of the time when scrolling up and down to the top.
[flexcoders] Custom HTTP service causes Type Coercion failed error on dispatchEvent
I have a custom HTTP service, in this service I have done overridden the dispatchEvent method to enable us to check for and handle any debug data contained in the HTTP response (as we're using CakePHP on the backend). What I'm doing is the following: override public function dispatchEvent(event:Event):Boolean { var theEvent:Event = event; if( event.type == ResultEvent.RESULT ) { theEvent = this.handleCakeResponse( event as ResultEvent ); } return super.dispatchEvent( theEvent ); } This all works fine, except from when there is a FaultEvent being dispatched, I get the following error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.rpc.events::[EMAIL PROTECTED] to mx.rpc.events.ResultEvent. at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.test.rpc.http::CakeHTTPService/dispatchEvent()[F:\Work\app\com\test\rpc\http\CakeHTTPService.as:63] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AbstractInvoker.as:146] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AbstractInvoker.as:195] at mx.rpc::Responder/fault()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\Responder.as:56] at mx.rpc::AsyncRequest/fault()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:110] at DirectHTTPChannel.as$131::DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\DirectHTTPChannel.as:368] at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() Note the line 63 in the stack trace refers to the return super.dispatchEvent( theEvent ); line. I'm really stuck with this, and now I can't debug an issue that is occurring as it is trying to dispatch a fault event, which it won't. Also as the HTTPService isn't released as part of the source code I'm working blind here so any help would be greatly appreciated. -D
[flexcoders] Using getStyle() for styleName, how does it work with nesting?
I have a custom component, which gets a custom style name using styleName={this.getStyle('myStyleName')}. I'm using this component in a couple of places within a view and I want it to be styled differently depending on where it is on the page, for example: HBox styleName=detailsWrap Form FormItem MyComponent HBox styleName=somethingElse VBox MyComponent I assumed I could just set the following in the CSS: .detailsWrap { myStyleName: 'styleNameOne'; } .somethingElse { myStyleName: 'styleNameTwo'; } But that doesn't appear to be working, if I inspect the components at runtime then I see that the style name isn't been set. This appears to be due to the nesting as if I do the following in the CSS: MyComponent { myStyleName: 'styleNameOne'; } Then the style in styleNameOne does get applied. I've also tried using child selectors, but I'm not sure if they're really supported in Flex, e.g. I've done: .detailsWrap * * MyComponent But that doesn't work either. Any ideas are greatly appreciated.
[flexcoders] Re: Modal Window that doesn't disable the whole flash player
Did you get this to work at all? I was digging through the PopUpManager implementation earlier this week in an attempt to do exactly this, but haven't had any luck yet. Any more tips would be really helpful. -D --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: You can copy the code from PopUpManager and put a modalTransparency window wherever you want. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Ingram Sent: Wednesday, September 19, 2007 6:40 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Modal Window that doesn't disable the whole flash player Hi, I want to know if it's possible to have a modal window that doesn't disable the whole of the flash player. For instance, I have an application which hosts another application (a widget). When the widget is waiting for it's data I use the PopUpManager to display a canvas (in order to blur the application and disable the user interface). The trouble is, the PopUpManager appears to be shared across all applications in the flash player, so the popup isn't added relative to the widget, it's added relative to the application. Also, the whole of the application is disabled, not just the widget. Does anyone have any clever ways around this? Thanks, Mark
[flexcoders] Re: DataGrid changing dataField property at runtime and updating datagrid
That works, thanks for that, although it does seem a bit of a hack to me. Anyway the important thing for now is that it works. -D --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would try: Var cols:Array = dg.columns; dg.columns = cols;
[flexcoders] DataGrid changing dataField property at runtime and updating datagrid
I've got a custom item renderer on a DataGrid which implements the IDropInListItemRenderer interface. It uses this to figure out the dataField the column is set to and then renders the item as appropriate. That all works OK, but then I want a ComboBox to change the dataField on the DataGridColumn and for everything to update as appropriate, but it doesn't seem to want to. The column only appears to update when I click on the header. I've tried calling any of these on the data grid: invalidateDisplayList(); invalidateProperties(); validateDisplayList(); validateNow(); validateProperties(); But they don't seem to be doing anything to the column. Basically all I'm trying to do is change the dataField of a column at runtime and use a custom renderer. I'm happy to look at alternative solutions. E.g. I did think about creating all the columns based on the data and adding them to the datagrid but have them not be visible, but that might be a bit too much and wouldn't be as clean as I imagine my solution to be (if it worked). Any ideas are greatly appreciated. -D
[flexcoders] Event bubbling question
I have created a custom HTTPService which we're going to use application wide, this deals with handling common backend responses or returning the response. If the users session times out I want this custom HTTPService to announce a 'UserSessionTimedOut' event then whoever cares about it can listen for it. However I've set the custom event to bubble but the listener I've attached to the Application never sees this event (but it is firing as if I add a listener to the custom HTTPService itself that listener sees it). This doesn't make sense to me, if I'm telling an event to bubble then it has to end up at the Application, no? Any help would be greatly appreciated here. -D
[flexcoders] Re: Event bubbling question
Hi Robert, That makes perfect sense, I was thinking that it could be something like that. Thanks. -D --- In flexcoders@yahoogroups.com, Robert Csiki [EMAIL PROTECTED] wrote: Hello Dave, HttpService object is not a UI component, hence the concept of parent does not apply for it, no matter where in your code you define it. That's why your event fired by it only uses the targeting phase, I guess...makes sense? Robert --- In flexcoders@yahoogroups.com, dave_defusion david.spurr@ wrote: I have created a custom HTTPService which we're going to use application wide, this deals with handling common backend responses or returning the response. If the users session times out I want this custom HTTPService to announce a 'UserSessionTimedOut' event then whoever cares about it can listen for it. However I've set the custom event to bubble but the listener I've attached to the Application never sees this event (but it is firing as if I add a listener to the custom HTTPService itself that listener sees it). This doesn't make sense to me, if I'm telling an event to bubble then it has to end up at the Application, no? Any help would be greatly appreciated here. -D
[flexcoders] Re: Flex is becoming unviable
It there was a way that I could load the modules in the background while the user is doing other things would be great, then it would be there right when I need it. A quick Google search would have shown you that this is possible with modules, by doing ModuleManager.getModule(MyModule.swf).load();, this will load the module but not display it, so when it's time for you to display it it's already been loaded. However the only time you should really do that is if you're sure the user is going to use that module while using your app. One of the most common cases for using modules seems to be when you have sections of your app (e.g. a preferences section) which the user isn't always going to require - so you only load that when they want it. -D
[flexcoders] Re: Mock objects in AS3
Bjorn, I have been looking at this (as I would like a mocking framework for Flex too) this evening and I've had no luck either. The the registerClassAlias() does add the alias to a given class I can't then get anything to accept it as being of that type - I'm not sure what the alias is, but dumping the describeType() results shows it as an alias property on the type and not as an implementsInterface node, which is what we need. I may not have been fully understood what registerClassAlias though. But it looks (ok, it's late and I'm tired so it may just be that which is causing my negativity) as if trying to get a class to implement an interface (or at least appear to implement an interface) dynamically at run time is a futile effort. Any thoughts? -D --- In flexcoders@yahoogroups.com, Bjorn Schultheiss [EMAIL PROTECTED] wrote: try add flash.net.registerClassAlias( attempt.TestInterface, TestInterface ); prior to your cast attempt. regards, Bjorn On 17/10/2007, at 1:06 PM, aduston1976 wrote: lus I see a number of places on the web where the idea is mentioned, e.g. http://www.herrodius.com/blog/?m=200704 . However I cannot find any mock frameworks for AS3. This evening I spent some time trying to mock one up on my own (ok, sorry for the pun!) but I ran into troubles. Is anyone interested in thinking about this problem with me? Here is what I did during my 20 minutes of playing: Define an interface: public interface TestInterface { function setSomething(something : String) : void; } Run the following code: public function flexmock() { var i : TestInterface; var c : Class = flash.utils.getDefinitionByName(attempt.TestInterface) as Class; var desc : XML = flash.utils.describeType(c); var str : String = desc.toString(); var a : Object = new Object(); a[setSomething] = function(something : String) : void { trace(something); }; // will fail on the following line, since a does not implement TestInterface. i = TestInterface(a); i.setSomething(blah); } AS3 doesn't support duck typing like Ruby, and I believe there is no way to get an object in memory that implements the TestInterface interface that my other objects can use as a mock. Any thoughts about this? Am I doomed to use elbow grease or code generation to create these things? BTW, this message is also posted on the ActionScript 3 FlexUnit Library forum in Google Groups. Hopefully that isn't some kind of forum faux pas. Thank you for any comments, Adam
[flexcoders] New ComboBox component
Just a quick note to let you know that I've released a new ComboBox component that implements option selection as you type, unlike the default ComboBox it does it on part words or full words. This is handy for quickly jumping to a known option in a large list of options within the ComboBox. I just created it as I had gotten so used to that kind of functionality within drop down boxes (in Firefox especially) that I really missed it within Flex. If you're interested an example, description and the download can be found here: http://www.defusion.org.uk/code/foxycombobox-for-flex/