RE: [flexcoders] Error thrown in application is being 'swallowed'
Binding swallows all errors. Also note that on the release players (you are running a debugger player) no dialogs are shown for uncaught errors. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of twcrone70 Sent: Tuesday, April 15, 2008 7:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Error thrown in application is being 'swallowed' If there is a critical failure in my applications I make sure to throw and error to bring the system down so that nothing fails quietly that can't be recovered from gracefully. However, I just found a case where a custom Error instance is thrown and even though it is not being caught in code, it never causes an Flash error window to appear, it just quits that particular operation and carries on like nothing happened. It is a case for a VO parsing a CSV. If the number of tokens is less than the required amount, an Error is thrown because the CSV should ALWAYS have the specific number of tokens (or more) when I call 'split'. Turns out it ignore the case where there was only 4 tokens when 5 are required. The code is trivial. var words:Array = message.split( , ); if ( words.length 5 ) { throw new InvalidMessageError( message, Device information messages require 5 fields, not + words.length ); } Anyone else experience this in Flex or Flash? Thanks, - Todd
RE: [flexcoders] SelectedIndex In A Datagrid
selectedIndex should work after the dataprovider has been updated. To see the selected row if it is offscreen, call scrollToIndex() From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bloodylag Sent: Tuesday, April 15, 2008 6:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] SelectedIndex In A Datagrid Hey, I have a datagrid which fills out with info via a JSON request. I want to be able to automatically select a row on events that the application throws itself (the datagrid isn't selectable to the user). I have tried to use selectedIndex to no avail. All attempts using validateNow() etc aren't working. The dataprovider is an arraycollection with 2 fields. Any ideas would be greatly appreciated
Re: [flexcoders] Re: Flex 3 purchased version, still displays Trial water mark...
Checked license.properties in: /Applications/Adobe\ Flex\ Builder\ 3/sdks/3.0.0/frameworks/ -J On Wed, Apr 16, 2008 at 3:49 PM, Ilam Mougy [EMAIL PROTECTED] wrote: I tried that. I tried changing the install location, the workspace, nothing works. I use Mac and I bought the FB Pro. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: You probably need to build the project as clean. Also, you purchased Flex Builder Pro and not standard, right? Only Pro will remove the watermark. Matt On 4/15/08 1:37 PM, Ilam Mougy [EMAIL PROTECTED] wrote: I downloaded the trial version, worked with it a bit, then I purchased the package. I put the serial number but I am still having the Trial water mark on the charts. I uninstalled and installed from the DVD, still I have the water mark issue. I can't imagine I am the only one who did that and have issue. Any hints on what else to do? Thanks, -- Therefore, send not to know For whom the bell tolls, It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: graphics object seems to degrade performance
Is there a way to clock exactly how long the actual drawing to the screen was taking? I know that profiling tools will show time spent within [pre-render] and [render], but I wonder if there is some thing that could be done inside my own code. In particular, I am trying to figure out where time is being spent. I suspect that it is not in rendering - but I would like to confirm that. Thanks. -Eric --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: Btw, is there any way to inspect the graphics object to see the drawing commands that it has? Unfortunately, no. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cooper Sent: Tuesday, April 15, 2008 1:47 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: graphics object seems to degrade performance Thanks. Yes, that one got me when I first started -- and took me a few days to realize what was happening. Btw, is there any way to inspect the graphics object to see the drawing commands that it has? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Also make sure you are calling graphics.clear() before re-drawing all of your graphic commands.
[flexcoders] Re: Do modules break tabbing???
All IFocusManagerComponents(containers).tabChildren == true; Could there be something stealing the focus related to modules? --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Did you verify that tabChildren=true on all containers of the IFocusManagerComponents in the module.? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss Sent: Tuesday, April 15, 2008 9:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Do modules break tabbing??? Do i need to do anything to get tabbing working within a loaded modules. It works when i replace the module tags with application.
[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: Flex 3 purchased version, still displays Trial water mark...
Thank you s much, (bow). I realized my issue, my project is using 2.0.1 SDK, so I put my old serial (in that file) and that made the watermark. btw, there is no such file under the 3.0, but I had no issue with 3.0 SDK and watermark. Thank you thank you thank you, I wasted the whole day because of this! Ilam --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Checked license.properties in: /Applications/Adobe\ Flex\ Builder\ 3/sdks/3.0.0/frameworks/ -J On Wed, Apr 16, 2008 at 3:49 PM, Ilam Mougy [EMAIL PROTECTED] wrote: I tried that. I tried changing the install location, the workspace, nothing works. I use Mac and I bought the FB Pro. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Matt Chotin mchotin@ wrote: You probably need to build the project as clean. Also, you purchased Flex Builder Pro and not standard, right? Only Pro will remove the watermark. Matt On 4/15/08 1:37 PM, Ilam Mougy imougy@ wrote: I downloaded the trial version, worked with it a bit, then I purchased the package. I put the serial number but I am still having the Trial water mark on the charts. I uninstalled and installed from the DVD, still I have the water mark issue. I can't imagine I am the only one who did that and have issue. Any hints on what else to do? Thanks, -- Therefore, send not to know For whom the bell tolls, It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Re: Flex 3 purchased version, still displays Trial water mark...
No worries. If only I could get that to work for me in 2.01 HF1 ;-) But it's all good, my wheel squeaking has been heard and I'm getting a 3.0 license tomorrow morning! :D On Wed, Apr 16, 2008 at 7:06 PM, Ilam Mougy [EMAIL PROTECTED] wrote: Thank you s much, (bow). I realized my issue, my project is using 2.0.1 SDK, so I put my old serial (in that file) and that made the watermark. btw, there is no such file under the 3.0, but I had no issue with 3.0 SDK and watermark. Thank you thank you thank you, I wasted the whole day because of this! Ilam --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Checked license.properties in: /Applications/Adobe\ Flex\ Builder\ 3/sdks/3.0.0/frameworks/ -J On Wed, Apr 16, 2008 at 3:49 PM, Ilam Mougy [EMAIL PROTECTED] wrote: I tried that. I tried changing the install location, the workspace, nothing works. I use Mac and I bought the FB Pro. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Matt Chotin mchotin@ wrote: You probably need to build the project as clean. Also, you purchased Flex Builder Pro and not standard, right? Only Pro will remove the watermark. Matt On 4/15/08 1:37 PM, Ilam Mougy imougy@ wrote: I downloaded the trial version, worked with it a bit, then I purchased the package. I put the serial number but I am still having the Trial water mark on the charts. I uninstalled and installed from the DVD, still I have the water mark issue. I can't imagine I am the only one who did that and have issue. Any hints on what else to do? Thanks, -- Therefore, send not to know For whom the bell tolls, It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Therefore, send not to know For whom the bell tolls, It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Configure LCDS+Hibernate on Tomcat
Hi, i'm trying to foolow the Adobe Tutorial to communicate with a MySQL DataBase through Hibernate but wan't make the example works... i've followed each step but no result. each time i've got the error : (mx.messaging.messages::ErrorMessage)#0 body = (null) clientId = (null) correlationId = 580E266D-755F-5EEC-6A5E-56905F67336D destination = employee.hibernate extendedData = (null) faultCode = Server.Processing faultDetail = (null) faultString = No destination 'employee.hibernate' exists in service flex.data.DataService headers = (Object)#1 messageId = DC567936-263A-3FE9-093E-1403A10FC5F0 rootCause = (null) timestamp = 1208338112390 timeToLive = 0 i've also tried with the Christophe Coenraets http://coenraets.org/blog/2007/01/flex-test-drive-server-for-java-devel\ opers-tomcat-based/ ' tomcat distribution that include all configuration for Hibernate and LCDS but even example of this distribution thrown errors... any help would be appreciate. Thx in advance ;-)
Re: [flexcoders] Re: Converting App to Flex 3
On Tuesday 15 Apr 2008, greggiec wrote: It is a flex 2 swc.. Is there anything I can do? Recompile it. -- Tom Chiverton Helping to completely improve intuitive content 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 Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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/
RE: [flexcoders] How to close current windows?
You can use navigateToURL( new URLRequest( 'javascript:window.close()' ), _self ); to execute the javascript. Alternatively, write the javascript in your HTML wrapper and call it through ExternalInterface. http://livedocs.adobe.com/flex/201/langref/flash/external/ExternalInterf ace.html Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markflex2007 Sent: 15 April 2008 20:33 To: flexcoders@yahoogroups.com Subject: [flexcoders] How to close current windows? Hi, Javascript 'window.close()' will close current. I need close current window from Flex.that mean I need a function in Flex to the javascript. Please give me a idea how to do this. Thanks Mark
[flexcoders] Re: Error thrown in application is being 'swallowed'
Ok...how do I make sure I see the error in the release player? Some of the interactions for our application are dependent on resources I cannot access from my dev environment, so most testing must happen on a VM and I can't even attach the debugger since my Mac does not have the stuff it needs for now. Yes, it is silly but no other options yet. Thanks, - Todd --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Binding swallows all errors. Also note that on the release players (you are running a debugger player) no dialogs are shown for uncaught errors. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of twcrone70 Sent: Tuesday, April 15, 2008 7:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Error thrown in application is being 'swallowed' If there is a critical failure in my applications I make sure to throw and error to bring the system down so that nothing fails quietly that can't be recovered from gracefully. However, I just found a case where a custom Error instance is thrown and even though it is not being caught in code, it never causes an Flash error window to appear, it just quits that particular operation and carries on like nothing happened. It is a case for a VO parsing a CSV. If the number of tokens is less than the required amount, an Error is thrown because the CSV should ALWAYS have the specific number of tokens (or more) when I call 'split'. Turns out it ignore the case where there was only 4 tokens when 5 are required. The code is trivial. var words:Array = message.split( , ); if ( words.length 5 ) { throw new InvalidMessageError( message, Device information messages require 5 fields, not + words.length ); } Anyone else experience this in Flex or Flash? Thanks, - Todd
RE: [flexcoders] Flexbuilder 2 wont' rebuild my project
Anyone else seen this problem? Sounds daft, but do you have any compilation errors? Check the problems screen first. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [EMAIL PROTECTED]
Re: [flexcoders] Re: Platform independent paths in AIR
On Tuesday 15 Apr 2008, zdenekmikan wrote: The file names are not unique, there can be files with the same names in different folders. so parent folder+name is unique ? -- Tom Chiverton Helping to challengingly introduce value-added e-commerce 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 Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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] Air installation issue
I'm facing this issue on Windows/MAC if i have an existing versioninstalled and try to upgrade it. If you uninstall the old version, thenew one installs cleanly otherwise throws an error: sorry, an error has occurred Theapplication could not be installed because an application with thatname already exists at the selected installation location.Tryinstalling to a different location. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[Flexcoders] How to calculate a buy out sum?
Hello, Upon popular request from our clients: How does one calculate the buy-out ( all rights: re-using, re-distributing, ... ) on a project? Is there a difference between easy and complex projects? Can someone point me to some nice links on the subject? Tnx! Bram
[flexcoders] Flex Compenents, how to make them talk
I was wondering if I create a Flex Application and have 5 Flex components that integrate within my Flex App, how can they all talk to each other Since they do not know about each other till the swf file is compiled, I am unable to have one component event trigger something on another component because they dont know about each other. Thanks for the help, Timgerr
[flexcoders] combobox
How can I bind my day combobox using for operator ?? thanks
[flexcoders] Firefox exposes https rpc-data in plugtmp
I use HTTPService quite extensively and when I run my flex-app in Firefox I suffer from slowdown after a couple of hours. I have tracked this down to Firefox storing all XML-request I do as files in the \Users\myname\AppData\Local\Temp\plugtmp-*\ directory. Even data transfered over https. First of all, I would like to stop this since it slows down my application. Secondly, it's really unsecure. Just download all the files in this directory and you have cleartext-data of all https rpc-calls. They are deleted when I close the application, but can easily be restored. Does anyone of you know of a way to stop this? I have tried various cache-directives in the php-files without any luck, and Internet Explorer does not seem to have this problem. Rickard.
[flexcoders] Re: Get Key Value Pair from an Object
I actually found the answer almost immediately after I posted. Here is the code in case anyone else has this issue. for (key in vars) { detailArray.addItem({key:key, value:vars[key]}) }
[flexcoders] Bind to Dynamic Component or Panel
I am creating a UI that gets configured from a database. For each DB entry it creates a panel dynamically. Then I have my app receiving messages. Based on the values in the message I decide which panel I want to display the message on. My question is when a panel is dynamically generated. How do I reference it so I can bind to it. i.e panel1.addChild(some object); Is there a getelementbyid reference. Does anyone else have a gui like this they could explain how they are doing it. thanks Greg
[flexcoders] Re: Embed Resources in Image Control
This is what I do (Who knows if it's right - all I know is that it works): [Bindable] [Embed(source=assets/images/mylogo.gif)] private var myLogo:Class; mx:Image source={myLogo}/ or img.source = myLogo; HTH Steve --- In flexcoders@yahoogroups.com, maliksmile [EMAIL PROTECTED] wrote: Hi, One can set source property of Image Control by a URL, like img.source = http://.../abc.png; or img.source = http://.../xyz.swf; In my case I just want to know how one can add a Embeded resource in source property in place of URL. I know it is possible but could somebody help me out. Thanks in advance. Regards, Saj
[flexcoders] Stack Chart ItemClick detail?
Is there a way to click on a stacked ColumnChart and receive data about the specific segment of ColumnChart stack that was clicked? I am using mx.charts.events.ChartItemEvent but I can't find anything in the event object that identifies the exact slice that was clicked. Thanks. Jeff
[flexcoders] Has anybody used PrintAdvancedDataGrid?
Has anybody used PrintAdvancedDataGrid? Does it print the data that is just available on screen or would it print all the data. i.e would it print a Multipage output or I have to programatially loop through the data validNextPage and nextPage()? Does any body have any example. Getting confused reading the printing stuff.
[flexcoders] Re: Flex 3 purchased version, still displays Trial water mark...
You also need to add your license serial no. in one of the files. or you could do it in Flex Builder- Help - Manage Flex Licenses add the serial no. Then do a clean build. Close Flex Builder and then open Flex builder again. --- In flexcoders@yahoogroups.com, Ilam Mougy [EMAIL PROTECTED] wrote: I tried that. I tried changing the install location, the workspace, nothing works. I use Mac and I bought the FB Pro. --- In flexcoders@yahoogroups.com, Matt Chotin mchotin@ wrote: You probably need to build the project as clean. Also, you purchased Flex Builder Pro and not standard, right? Only Pro will remove the watermark. Matt On 4/15/08 1:37 PM, Ilam Mougy imougy@ wrote: I downloaded the trial version, worked with it a bit, then I purchased the package. I put the serial number but I am still having the Trial water mark on the charts. I uninstalled and installed from the DVD, still I have the water mark issue. I can't imagine I am the only one who did that and have issue. Any hints on what else to do? Thanks,
Re: [flexcoders] Firefox exposes https rpc-data in plugtmp
On Wednesday 16 Apr 2008, rickarddahlstrand wrote: I use HTTPService quite extensively and when I run my flex-app in Firefox I suffer from slowdown after a couple of hours. I have tracked this down to Firefox storing all XML-request I do as files in the \Users\myname\AppData\Local\Temp\plugtmp-*\ directory. Even data transfered over https. At a guess, disable all your plugins and/or use a clean profile. If that works, maybe you have a connection inspecting plugin installed ? -- Tom Chiverton Helping to enthusiastically supply real-time designs 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 Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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: mx:List with itemRenderer
any ideas? --- In flexcoders@yahoogroups.com, tchredeemed [EMAIL PROTECTED] wrote: I have a list that has an itemRenderer. The footer of the itemRenderer can be dragged up or down in order to show/hide data. I want to be able to drag that without triggering the dragHandler for the list. In other words, I want to be able to drag an item from anywhere except the footer to move it inside the list, but if i drag from the footer, i do not want it to trigger. Any ideaS?
Re: [flexcoders] Re: mx:List with itemRenderer
try capturing whether a drag can occur based on a mouseOver maybe. eg, onMouserOver set canDrag = true if NOT over the footer. Then in your drag handler check this to see if drag is allowed or not. This technique I use usually to make sure the user clicks on the actual object to be dragged, but not outside the object. DK On Wed, Apr 16, 2008 at 9:43 AM, tchredeemed [EMAIL PROTECTED] wrote: any ideas? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, tchredeemed [EMAIL PROTECTED] wrote: I have a list that has an itemRenderer. The footer of the itemRenderer can be dragged up or down in order to show/hide data. I want to be able to drag that without triggering the dragHandler for the list. In other words, I want to be able to drag an item from anywhere except the footer to move it inside the list, but if i drag from the footer, i do not want it to trigger. Any ideaS? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
Re: [flexcoders] any flex image editor control?
i found this one after some short googling http://www.geocities.com/j_c_desai/ImageEditing/ImageEditing.html d. On Tue, Apr 15, 2008 at 10:40 PM, slee_usa [EMAIL PROTECTED] wrote: I am looking for a flex control which allows photo or image editing. It should be very light, and I need to embed it in my flex app. Anybody knows any good one? Thanks in advance, Sean
[flexcoders] AIR: Forcing a file to be opened By OS Default Application
Pardon the cross post, but I'm trying to find out if AIR supports triggering a file to be opened by the OS's default application for that file extension. Like having MS Excel open a .xls file. Jeff Battershall Application Architect Dow Jones Indexes [EMAIL PROTECTED] (609) 520-5637 (p) (484) 477-9900 (c)
[flexcoders] Flex SDK2 with Flex Builer 3 ???
I have one question that can we use Flex SDK 2.0.3 with Flex Builder 3,if it is possible and any one has done this plz reply. Regards, Jai Kumar
[flexcoders] svg image not load through xml ???
Hi Folks, I am using some drag and drop function. so i import the images to the tilelist control. and am using the gallery.xml. like *gallery image title=Flash name=Flash thumbnailImage=assets/image1.svg / /gallery* the tilelist control have a image item renderer. so that am see the images at runtime. when i am using the normal jpg, gif, png it is working fine. but am using the Scalable Vector Graphics (SVG) the image not loaded at run time. how can i get the image. and also i change the xml to *image title=Flex thumbnailImage=@Embed(source='assets/image1.svg') name=flex / no responce. Please reply me. *-- Thanks Regards Swaminathan. M
Re: [flexcoders] RegExp searching for [ and ], are they reserved?
hey i'm not a regex pro by far which is why i asked if my regex was wrong- but taking your suggestion it still does not work- not sure why. i've used the RegExr air app to test this and the simplest i can get it is new RegExp(\[[^]*\],igm); this works when {} are used but not when [] is used, you can see in the example below- it looks like escaping the [] is affecting the match (although it works fine in the regex test tool). ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var mergeRE:RegExp = new RegExp(\[[^]*\],igm); private var mergeRE2:RegExp = new RegExp({[^]*},igm); public function runSquareBracketTest():void { var response:Array = subjectString.text.match(mergeRE); resultString.text = response.toString(); } public function runCurlyBracketTest():void { var response:Array = subjectString.text.match(mergeRE2); resultString.text = response.toString(); } ]] /mx:Script mx:VBox mx:TextArea id=subjectString width=400 height=200 mx:text ![CDATA[strong[Employee First Name] /strong strong{Employee Last Name} /strong]] /mx:text /mx:TextArea mx:TextArea id=resultString width=400 height=200 / mx:Button click=runSquareBracketTest(); label=Get first name. / mx:Button click=runCurlyBracketTest(); label=Get last name. / /mx:VBox /mx:Application On Tue, Apr 15, 2008 at 4:33 PM, Gordon Smith [EMAIL PROTECTED] wrote: I'm confused... why isn't your pattern something like \[.*]\] ? What's going on with the ^ and the ? What is supposed to match against letters like E, m, p, l, etc.? Gordon Smith Adobe Flex SDK Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Anderson *Sent:* Tuesday, April 15, 2008 1:23 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] RegExp searching for [ and ], are they reserved? i had tried escaping them, below i've pasted an example of my problem- 2 samples: 1 looking for [Employee First Name] and one looking for {Employee First Name} (curly braces vs square braces) and even though the brackets are escaped, the regex with [ and ] only return the ending ]. do i have the regex wrong? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var mergeRE:RegExp = new RegExp(\[[^]*?\],igm); private var mergeRE2:RegExp = new RegExp({[^]*?},igm); public function runSquareBracketTest():void { var response:Array = subjectString.text.match(mergeRE); resultString.text = response.toString(); } public function runCurlyBracketTest():void { var response:Array = subjectString.text.match(mergeRE2); resultString.text = response.toString(); } ]] /mx:Script mx:VBox mx:TextArea id=subjectString width=400 height=200 mx:text ![CDATA[strong[Employee First Name] /strong strong{Employee Last Name} /strong]] /mx:text /mx:TextArea mx:TextArea id=resultString width=400 height=200 / mx:Button click=runSquareBracketTest(); label=Get first name. / mx:Button click=runCurlyBracketTest(); label=Get last name. / /mx:VBox /mx:Application On Tue, Apr 15, 2008 at 4:08 PM, Gordon Smith [EMAIL PROTECTED] wrote: [ and ] are metacharacters in RegExp patterns. For example, [abc] matches either a, or 'b or c. To prevent this interpretation, escape them with a backslash. Gordon Smith Adobe Flex SDK Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Anderson *Sent:* Tuesday, April 15, 2008 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] RegExp searching for [ and ], are they reserved? hey all, i'm trying to do a replace on a string and replace anything in brackets with something else. so [this] word would get replaced, however in the regex tester at gskinner this works fine (it's flex based regex test tool) but in my local code- i always get unexpected results when my regex expression has brackets in it. private var mergeRE:RegExp = new RegExp(\[[^]*?],igm); is there another escape character i need to use, why does flash have a problem searching for [ and ] in regex? thanks, d.
RE: [flexcoders] Re: Error thrown in application is being 'swallowed'
You would have to catch the error and display your own dialog box. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of twcrone70 Sent: Wednesday, April 16, 2008 4:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Error thrown in application is being 'swallowed' Ok...how do I make sure I see the error in the release player? Some of the interactions for our application are dependent on resources I cannot access from my dev environment, so most testing must happen on a VM and I can't even attach the debugger since my Mac does not have the stuff it needs for now. Yes, it is silly but no other options yet. Thanks, - Todd --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: Binding swallows all errors. Also note that on the release players (you are running a debugger player) no dialogs are shown for uncaught errors. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of twcrone70 Sent: Tuesday, April 15, 2008 7:36 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Error thrown in application is being 'swallowed' If there is a critical failure in my applications I make sure to throw and error to bring the system down so that nothing fails quietly that can't be recovered from gracefully. However, I just found a case where a custom Error instance is thrown and even though it is not being caught in code, it never causes an Flash error window to appear, it just quits that particular operation and carries on like nothing happened. It is a case for a VO parsing a CSV. If the number of tokens is less than the required amount, an Error is thrown because the CSV should ALWAYS have the specific number of tokens (or more) when I call 'split'. Turns out it ignore the case where there was only 4 tokens when 5 are required. The code is trivial. var words:Array = message.split( , ); if ( words.length 5 ) { throw new InvalidMessageError( message, Device information messages require 5 fields, not + words.length ); } Anyone else experience this in Flex or Flash? Thanks, - Todd
Re: [flexcoders] AIR: Forcing a file to be opened By OS Default Application
According to a talk that Ben Forta gave here in Nashville, not long before product launch, the AIR sandbox strictly prohibits access to other programs on a system. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com
RE: [flexcoders] AIR: Forcing a file to be opened By OS Default Application
Steve, In the scenario I'm envisioning, I am not thinking that AIR would be starting the program itself but the OS would, as it would in response to a double click on a file name in Windows Explorer. But if it can't be done, it can't be done. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cutter (Flex Related) Sent: Wednesday, April 16, 2008 10:32 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AIR: Forcing a file to be opened By OS Default Application According to a talk that Ben Forta gave here in Nashville, not long before product launch, the AIR sandbox strictly prohibits access to other programs on a system. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] AIR: Forcing a file to be opened By OS Default Application
True, but I thought you could link to a file and then let the OS handle it. I haven't tested this, though... Cutter (Flex Related) wrote: According to a talk that Ben Forta gave here in Nashville, not long before product launch, the AIR sandbox strictly prohibits access to other programs on a system. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com http://blog.cutterscrossing.com -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Re: Intelligent ViewStack Children
Rick, Thanks for the awesome advice! Gonna hash this out. When we get this working I will definitely post the solution on here so other people can look it up :D Thanks again for taking the time to give me some direction on this.
Re: [flexcoders] Intelligent ViewStack Children
Joshua, I *just* solved this problem yesterday. All you need to do is add a listener for the FlexEvent.SHOW event. Your callback method will always be called when the ViewStack shows your child container. Regards, Bruce On Mon, Apr 14, 2008 at 2:38 PM, joshua gatcke [EMAIL PROTECTED] wrote: Does anyone know if it is possible for a component to know if it's 'visible' or 'on screen' when it's inside a ViewStack without looking at the parent ViewStacks properties? I have a component and I need to to 'know' if it's actually in the showing viewstack child or in one of the hidden ones. I cannot look at the parent ViewStack because I will not know where or how this component is being used. I looked through piles of documentation, not sure if I am just thick or something. Any suggestions would rock the casbah, thanks in advance.
[flexcoders] SWF generated by ant does not work
Hi I am trying to build my Flex/Java project with ant because it is the way we build all the projects but for some reason the SWF file that is generated by the ant script is not working but the one generated by Flex Builder works. Also I noticed that the one created by ANT is smaller than the one in FB by 100KB. Some of the exceptions I get from the ANT swf when I start the application are: ReferenceError: Error #1065: Variable Main__embed__font_Lucida_Grande_bold_normal_772051250 is not defined. ReferenceError: Error #1065: Variable Main__embed_css_skins_yflexskin_swf_ComboBoxArrow_editableDisabledSkin_6\ 88445556 is not defined. ReferenceError: Error #1065: Variable Main__embed__font_Myriad_medium_normal_23887842 is not defined. Looks like most of this errors have to do with embeded resources, I am embeding some fonts and the yahoo skin for flex. Here it is my mxml task, don't say anything about the hard coded paths, I know I have to use properties but first I am trying to get a working SWF :P . mxmlc file=${source.flex}/Main.mxml output=${build.flex}/Main.swf services=src/main/webapp/WEB-INF/flex/services-config.xml keep-generated-actionscript=false context-root=Automation incremental=false fork=false load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/ source-path path-element=${FLEX_HOME}/frameworks / source-path path-element=${source.flex} / compiler.library-path dir=${FLEX_HOME}/frameworks append=true include name=libs / /compiler.library-path compiler.external-library-path dir=src/main/flex_libs append=true include name=**/* / /compiler.external-library-path /mxmlc Am I missing something in the build task? Thanks
[flexcoders] Re: Bind to Dynamic Component or Panel
It sounds like getChildByName is what you need: yourContainer.getChildByName(panel1) Regards, Oscar http://www.holaflex.com http://www.holaflex.com --- In flexcoders@yahoogroups.com, gjessup1 [EMAIL PROTECTED] wrote: I am creating a UI that gets configured from a database. For each DB entry it creates a panel dynamically. Then I have my app receiving messages. Based on the values in the message I decide which panel I want to display the message on. My question is when a panel is dynamically generated. How do I reference it so I can bind to it. i.e panel1.addChild(some object); Is there a getelementbyid reference. Does anyone else have a gui like this they could explain how they are doing it. thanks Greg
[flexcoders] Re: Stack Chart ItemClick detail?
I couldn't find that info either. The solution I'm using, until I learn of a more direct way, is to assign a number to the ColumnSeries Name property when I create each ColumnSeries (I happen to use Series0, Series1, Series2, etc). Here's the relevant code fragmants for creating, and then accessing the column number. // Creating the columns private const SeriesName:String = Series; for (var c:int = 1; c seriesCount; c++) { var cs:ColumnSeries = new ColumnSeries(); cs.name = SeriesName + id; // Series0, Series1, Series2,etc etc... } // Accessing the clicked column's data public function chartItemSelected (e:ChartItemEvent):void { // extract the number after Series var str:String = e.hitData.chartItem.element.name.substr(SeriesName.length, e.hitData.chartItem.element.name.length); var colNum:Number = parseInt(str); } Hope that helps, and/or we learn of a better way. -Eddie --- In flexcoders@yahoogroups.com, securenetfreedom [EMAIL PROTECTED] wrote: Is there a way to click on a stacked ColumnChart and receive data about the specific segment of ColumnChart stack that was clicked? I am using mx.charts.events.ChartItemEvent but I can't find anything in the event object that identifies the exact slice that was clicked. Thanks. Jeff
[flexcoders] Re: Flex SDK2 with Flex Builer 3 ???
FB 3 has multiple SDK support, so you can add your specific version under Flex/Installed Flex SDK in Preferences. Click Add and browse for the SDK's location. Then you can set this SDK as your default SDK or select it when you create a new Flex project. Regards, Oscar http://www.holaflex.com http://www.holaflex.com --- In flexcoders@yahoogroups.com, janbhanijai [EMAIL PROTECTED] wrote: I have one question that can we use Flex SDK 2.0.3 with Flex Builder 3,if it is possible and any one has done this plz reply. Regards, Jai Kumar
RE: [flexcoders] Re: Do modules break tabbing???
Generally, all IFocusManagerComponents should be tabEnabled=true, and all parents of them should be tabChildren=true. I'd check the upper level module tag and whatever parents it first. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss Sent: Wednesday, April 16, 2008 12:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Do modules break tabbing??? All IFocusManagerComponents(containers).tabChildren == true; Could there be something stealing the focus related to modules? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: Did you verify that tabChildren=true on all containers of the IFocusManagerComponents in the module.? From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Bjorn Schultheiss Sent: Tuesday, April 15, 2008 9:12 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Do modules break tabbing??? Do i need to do anything to get tabbing working within a loaded modules. It works when i replace the module tags with application.
Re: [flexcoders] svg image not load through xml ???
On Wed, Apr 16, 2008 at 8:28 AM, Swamy Nathan [EMAIL PROTECTED] wrote: but am using the Scalable Vector Graphics (SVG) the image not loaded at run time. how can i get the image. and also i change the xml to Flex cannot load and display SVGs at runtime. You can only embed them (that is, you can have the compiler change it into a SWF shape that it can use _at compile time_). If you need to be able to load your images at runtime, you should convert them to some other supported format (GIF, JPEG, PNG or SWF). image title=Flex thumbnailImage=@Embed(source='assets/image1.svg') name=flex / Yeah, those @Embed instructions are for the compiler, not for the player, those won't help at runtime. -- gabriel montagné láscaris comneno http://rojored.com t/506.8392.2040
[flexcoders] Resizing the canvas
Hi All, I am new to Flex and desperately in need of help. I have to design a Canvas or UIComponent which can be resized from both the ends (Horizontally). I have done the resizing the from the right side of the canvas by adjusting the width:) I am stuck with the left side resizing. Please help me in this regard. Thanks in advance, Raghu
RE: [flexcoders] AIR: Forcing a file to be opened By OS Default Application
I don't think that's the case. (would love to be proven wrong mind you) If so, then surely one could just write a text file, give it a .bat extention and it would be run by default by command.exe? (OK, windows example but there must be a mac equivalent). It would be very useful though! :-) By the way, is there an AIR specific equivalent of this group? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffry Houser Sent: 16 April 2008 15:54 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AIR: Forcing a file to be opened By OS Default Application True, but I thought you could link to a file and then let the OS handle it. I haven't tested this, though... Cutter (Flex Related) wrote: According to a talk that Ben Forta gave here in Nashville, not long before product launch, the AIR sandbox strictly prohibits access to other programs on a system. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com http://blog.cutterscrossing.com http://blog.cutterscrossing.com http://blog.cutterscrossing.com -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com http://www.dot-com-it.com My Podcast: http://www.theflexshow.com http://www.theflexshow.com My Blog: http://www.jeffryhouser.com http://www.jeffryhouser.com __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] Building XML out of an Array Collection
I'm trying to change an array collection of typed objects from a .NET webservice into XML. My array collection is like this: myNode{ label:String id:int children:ArrayCollection } The items in the children array collection are more of myNode. I want to put it into xml so it looks like this: myNodes myNode label=test1 id=1/ myNode label=test2 id=2 myNode label=test3 id=3/ myNode label=test4 id=4/ myNode label=test5 id=5/ /myNode myNode label=test6 id=6/ /myNodes I always work with arraycollections and never with xml, but this situation requires it. I just need to know how to start. I can loop through my arraycollection tree if I just know how to do a node or two. THANKS! :) Nate
[flexcoders] AIR: Take a screenshot
Hi All, i have a window and with a button i want to make a screenshot from that window How can i make that, or have someone a example Thanks in advance, Peter
Re: [flexcoders] Re: Custom Cursors causing slowdown
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: How to download a BLOB from database....using Java
Send your object using this //flex package server { import flash.utils.ByteArray; [RemoteClass(alias=server.Tag)] public class Tag { public function Tag(){ picture = new ByteArray(); } public var info:String; public var picture:ByteArray; } } // Java package server; public class Tag { private String info; private byte[] picture; public Tag() {} public String getInfo() { return info; } public void setInfo(String info) { this.info = info; } public byte[] getPicture() { return picture; } public void setPicture(byte[] picture) { this.picture = picture; } } Cato Paus --- In flexcoders@yahoogroups.com, Jim Hayes [EMAIL PROTECTED] wrote: Ok, gotcha! You need to use Loader.loadBytes(b:byteArray) var loader:Loader = new Loader(); loader.loadBytes(yourByteArray); Now, the bitmap *will* be available in the loaders content property, but do not assume that just because you gave it a preloaded bytearray that it will be *immediately* available. Or you will be sad and confused, as was I :) No, the bitmap will only be available once the loader.contentLoaderInfo complete event fires. So, add an event listener for the complete event : loader.contentLoaderInfo.addEventListener (Event.COMPLETE,loaderCompleteHandler); Then get the bitmap from the loader at that point in time : private function loaderCompleteHandler(event:Event) { var loader:Loader = event.target as Loader; var bmp:Bitmap = Bitmap(loader.content); // do something with bmp here, such as displaying it. } I'm not sure if the image component now will take a byteArray directly, there was some talk of it a few months back so it may have got added to the flex 3 code. -Original Message- From: flexcoders@yahoogroups.com on behalf of Jon Santos Sent: Sat 12/04/2008 13:01 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How to download a BLOB from databaseusing Java Hi Jim.i know how to get the image in my POJO. The process i´m following: I get the image form database throw my servlet. In this class i get the ImageObject (POJO), it means the image and other data. In my FLEX application i have one object ImageObject (Action Script)like Remote Object for the java objectthen i able to get the image and the other data in my FLEX application The unique problem i´m finding : I don´t know how to display in my FLEX application (it means your B question).i don´t know which component i must use to display my image (array of bytes). Thanks in advanceand i hope u already understad my problem. - Original Message From: Jim Hayes [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, April 11, 2008 11:53:38 PM Subject: RE: [flexcoders] How to download a BLOB from databaseusing Java Is your question a) how to get the byteArray into flex? b) how to display it once it is in flex? c) both a and b ? I can help you with b ! -Original Message- From: [EMAIL PROTECTED] ups.com on behalf of txakin Sent: Fri 11/04/2008 14:29 To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] How to download a BLOB from database using Java Hi all I would like to know...how to download a BLOB (image, file...binary data) from my Oralce database to my Flex application. I think i already have my servlet createdthe souce can be more or less like the next one: Session session = HibernateSessionFac tory.getSession( ); //Here i get my POJO (my movieImage object) MovieImage myMovieImage = (MovieImage) session.load( MovieImage. class, movieId); //I got the binary data (in this case one image), into array of bytes byte[] myCover = myMovieImage. getCover( ); ServletOutputStream servletOutputStream = res.getOutputStream (); res.setContentType( application/ image); res.setContentLengt h(myCover. length); servletOutputStream .write(myCover, 0, myCover.length) ; servletOutputStream .flush(); servletOutputStream .close(); But my problem is how to show that image in my component... . Can someone help me (with some source or with some steps or some example) to get the solution? Thansk in advance. _ _ _ _ _ _ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete
Re: [flexcoders] Letting parents handle drag events
Is there a reason you can't use capture phase listeners? I definitely can, and that's the solution I'm going to use. It just didn't occur to me because: a) I was working in MXML and was just attaching listeners using attributes. b) DragEvent inherits from MouseEvent, which to me at least, implies that it behaves like MouseEvent, which means a default of bubbling (even though the MouseEvent constructor indicates the default is to not bubble, which I assume is just in keeping with Event's constructor's default arguments). So, my problem is now solved... I just think both of these issues should be raised somewhere officially so others don't bang their head on it quite as much as I did. The two points that need to be made: - MXML event attributes are added with the defaults, which means *not* the capture phase. - DragEvents don't bubble like MouseEvents, so if you need to get them higher up the hierarchy you have to capture them. Troy.
RE: [flexcoders] Building XML out of an Array Collection
You can write the values straight into the xml notation using curly brackets : something like var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ not sure I have the arrayCollection syntax correct, but hopefully you can see what I mean? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: 16 April 2008 16:59 To: flexcoders@yahoogroups.com Subject: [flexcoders] Building XML out of an Array Collection I'm trying to change an array collection of typed objects from a .NET webservice into XML. My array collection is like this: myNode{ label:String id:int children:ArrayCollection } The items in the children array collection are more of myNode. I want to put it into xml so it looks like this: myNodes myNode label=test1 id=1/ myNode label=test2 id=2 myNode label=test3 id=3/ myNode label=test4 id=4/ myNode label=test5 id=5/ /myNode myNode label=test6 id=6/ /myNodes I always work with arraycollections and never with xml, but this situation requires it. I just need to know how to start. I can loop through my arraycollection tree if I just know how to do a node or two. THANKS! :) Nate __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] Re: Building XML out of an Array Collection
I gotcha! So what about adding children to that xml node? Do you treat it just like a string or something? so If I wanted to add a child to that node would it be something like this: var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]} newNode = newNode + myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ I thought I saw some method called append in xml. I was hoping I could create XMLNode(s) and do something like newNode.append(myNewXMLNode) thanks for responding so fast! --- In flexcoders@yahoogroups.com, Jim Hayes [EMAIL PROTECTED] wrote: You can write the values straight into the xml notation using curly brackets : something like var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ not sure I have the arrayCollection syntax correct, but hopefully you can see what I mean? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: 16 April 2008 16:59 To: flexcoders@yahoogroups.com Subject: [flexcoders] Building XML out of an Array Collection I'm trying to change an array collection of typed objects from a .NET webservice into XML. My array collection is like this: myNode{ label:String id:int children:ArrayCollection } The items in the children array collection are more of myNode. I want to put it into xml so it looks like this: myNodes myNode label=test1 id=1/ myNode label=test2 id=2 myNode label=test3 id=3/ myNode label=test4 id=4/ myNode label=test5 id=5/ /myNode myNode label=test6 id=6/ /myNodes I always work with arraycollections and never with xml, but this situation requires it. I just need to know how to start. I can loop through my arraycollection tree if I just know how to do a node or two. THANKS! :) Nate __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
RE: [flexcoders] Re: Building XML out of an Array Collection
I think it's yourNode.appendChild(newNode), off the top of my head. Personally I'd prefer that to concatinating (love that word!) strings. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: 16 April 2008 17:17 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Building XML out of an Array Collection I gotcha! So what about adding children to that xml node? Do you treat it just like a string or something? so If I wanted to add a child to that node would it be something like this: var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]} newNode = newNode + myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ I thought I saw some method called append in xml. I was hoping I could create XMLNode(s) and do something like newNode.append(myNewXMLNode) thanks for responding so fast! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Jim Hayes [EMAIL PROTECTED] wrote: You can write the values straight into the xml notation using curly brackets : something like var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ not sure I have the arrayCollection syntax correct, but hopefully you can see what I mean? -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Nate Pearson Sent: 16 April 2008 16:59 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Building XML out of an Array Collection I'm trying to change an array collection of typed objects from a .NET webservice into XML. My array collection is like this: myNode{ label:String id:int children:ArrayCollection } The items in the children array collection are more of myNode. I want to put it into xml so it looks like this: myNodes myNode label=test1 id=1/ myNode label=test2 id=2 myNode label=test3 id=3/ myNode label=test4 id=4/ myNode label=test5 id=5/ /myNode myNode label=test6 id=6/ /myNodes I always work with arraycollections and never with xml, but this situation requires it. I just need to know how to start. I can loop through my arraycollection tree if I just know how to do a node or two. THANKS! :) Nate __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __ __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
RE: [flexcoders] Pass Variables and then run a command
Timgerr, your code is assigning the value vsTop.selectedChild = register to the String _runStackChild, but the expression statement _runStackChild; doesn't cause this string to execute... it simply causes the Player to evaluate this (trivial) expression, which doesn't accomplish anything. It's like writing var s:String = Hello; s; Alex showed you one approach, but it's probably a more complicated solution than you need. Rather than specifying things like which-viewstack and which-state by name, you should be specifying them using object references. For example, you could simply write mx:Button id=btnOne click=vsTop.selectedChild = register/ or, if you really want a helper method like ChangeState(), do this mx:Button id=btnOne click=ChangeState(vsTop, register)/ public function ChangeState(vs:ViewStack, state:Container):void { vs.selectedChild = state; } Also, you seem to be using instance vars needlessly when you could simply use local vars. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Tuesday, April 15, 2008 11:00 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Pass Variables and then run a command We're not an interpreted language and don't have eval(). The best you can probably do is something like: this[_stackName].selectedChild = this[_stateName] From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of timgerr Sent: Tuesday, April 15, 2008 8:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Pass Variables and then run a command Hey all, I am new with flex, coming from JavaScript and perl. I am writing an application that will have lots of MXML components like a login component, register component and many more. The problem is I am trying to have all the components talk to each other, I am having trouble doing that. This is my problem, I have a viewStack and I created a method like this private var _stackName:String; private var _stateName:String; private var _runStackChild:String; public function ChangeState(stackName:String, stateName:String)void { _stackName = stackName; _stateName = stateName; _runStackChild = _stackName + .selectedChild = + _stateName ; _runStackChild; } mx:Button id=btnOne click=ChangeState('vsTop','register'); So when I click the button the mothod ChangeState is called and passed are the 2 variables. At the end ChangeState should run the command vsTop.selectedChild = register; If I clear the method and just add vsTop.selectedChild = register;, the stack is changed, but when I run _runStackChild; nothing hapends. What am I missing??? Thanks, Timgerr
Re: [flexcoders] Re: graphics object seems to degrade performance
You could use the getTimer() function. (It's a function of the flash.utils package: http://livedocs.adobe.com/flex/201/langref/flash/utils/package.html). However, that will only tell you the execution time of the code. I've had issues with the graphics object where the time it takes to run the code is shorter than the time it takes the player to render those instructions. If that happens it'll probably be pretty obvious if what's going on. - Daniel Freiman On Wed, Apr 16, 2008 at 2:54 AM, Eric Cooper [EMAIL PROTECTED] wrote: Is there a way to clock exactly how long the actual drawing to the screen was taking? I know that profiling tools will show time spent within [pre-render] and [render], but I wonder if there is some thing that could be done inside my own code. In particular, I am trying to figure out where time is being spent. I suspect that it is not in rendering - but I would like to confirm that. Thanks. -Eric --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: Btw, is there any way to inspect the graphics object to see the drawing commands that it has? Unfortunately, no. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Eric Cooper Sent: Tuesday, April 15, 2008 1:47 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: graphics object seems to degrade performance Thanks. Yes, that one got me when I first started -- and took me a few days to realize what was happening. Btw, is there any way to inspect the graphics object to see the drawing commands that it has? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com , Alex Harui aharui@ wrote: Also make sure you are calling graphics.clear() before re-drawing all of your graphic commands.
RE: [flexcoders] Flex Compenents, how to make them talk
If you have Application MyContainer id=myContainer MyControl id=myControl/ /myContainer /Application then in the Application's Script you can simply refer to the MyContainer instance as myContainer and to the MyControl instance as myControl (NOT myContainer.myControl). In MyContainer's Script you can refer to the Application instance as parentDocument or as Application.application. In MyControls' Script you can refer to to the MyContainer instance as parentDocument and to the Application instance as parentDocument.parentDocument or as Application.application. In general, you can access anything from anywhere. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of timgerr Sent: Tuesday, April 15, 2008 8:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Compenents, how to make them talk I was wondering if I create a Flex Application and have 5 Flex components that integrate within my Flex App, how can they all talk to each other Since they do not know about each other till the swf file is compiled, I am unable to have one component event trigger something on another component because they dont know about each other. Thanks for the help, Timgerr
[flexcoders] Calling http services in separate file
Hello Everyone, I want to clean up my code and put all of my http services in a separate mxml file.. how would I call these at runtime?? Thanks
[flexcoders] Re: AIR: Forcing a file to be opened By OS Default Application
Jeff, We've been looking into it as well. Maybe the following links could give you some more help: http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integration-proof-of-concept/ and http://www.mikechambers.com/blog/2008/01/22/commandproxy-its-cool-but-is-it-a-good-idea/ It's a long shot a workaround...something adobe really needs to address soon! --- In flexcoders@yahoogroups.com, Battershall, Jeff [EMAIL PROTECTED] wrote: Steve, In the scenario I'm envisioning, I am not thinking that AIR would be starting the program itself but the OS would, as it would in response to a double click on a file name in Windows Explorer. But if it can't be done, it can't be done. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cutter (Flex Related) Sent: Wednesday, April 16, 2008 10:32 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AIR: Forcing a file to be opened By OS Default Application According to a talk that Ben Forta gave here in Nashville, not long before product launch, the AIR sandbox strictly prohibits access to other programs on a system. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Invalidation problem with popups
Here's some sample code. Notice how if you click updatePopup while the popup is showing you'll see the contents of the popup update. If you close the popup, and click on update popup, the next time you click on showPopup, the popup will not display correctly. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal mx:Script ![CDATA[ import mx.controls.Label; import mx.events.CloseEvent; import mx.managers.PopUpManager; import mx.containers.Panel; import mx.containers.TitleWindow; private var popup:TitleWindow; private var count:Number = 0; private function createPopup():void { if (!popup) { popup = new TitleWindow(); popup.title = popup window; popup.showCloseButton = true; popup.addEventListener( CloseEvent.CLOSE, onClose ); updatePopup(); } } private function showPopup():void { createPopup(); PopUpManager.addPopUp( popup, this, false ); PopUpManager.centerPopUp( popup ); } private function updatePopup():void { createPopup(); var i:int; for (i = popup.numChildren - 1; i = 0; i--) { popup.removeChildAt( i ); } for (i=0;i 5; i++) { var label:Label = new Label; label.text = String(count ); popup.addChild( label ); count++; } } private function onClose(e:Event):void { PopUpManager.removePopUp( popup ); } ]] /mx:Script mx:Button label=show popup click=showPopup()/ mx:Button label=update popup click=updatePopup()/ /mx:Application
[flexcoders] Re: Bind to Dynamic Component or Panel
Oscar, Thanks for that. That is basically exactly what I needed. The one problem I am running into is that I want my panels to be only 3 wide on the page and I have 12 entries in the DB. So I am creating a page 3 panels wide and 4 panels down. To do this I create a new HBOX every 3rd Panel. so I need a way to figure out which HBOX the panel is in. Then I can do HBOX3.getChildByName(My Panel) The way I am starting to do this is by creating an array collection that keeps the Panel Names and the childIndex for the HBOX and the Panel. What would be nice is if you had a Canvas and and it didn't matter how many levels deep the panel was (i.e the panel had a global bindable name) Then you could do Canvas.getChildByName. I can post code if that doesn't make sense.
[flexcoders] Problem with Bind and Repeater
I have a small portion of code that crashes all the time. Here's the code: Application: BindProblem.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=begin() xmlns:local=* mx:Script ![CDATA[ import Dummy; [Bindable] private var provider:Array; private function begin():void { var row1:Dummy = new Dummy(); row1.field1 = Field data 1 row 1; row1.field2 = Field data 2 row 1; var row2:Dummy = new Dummy(); row2.field1 = Field data 1 row 2; row2.field2 = Field data 2 row 2; provider = [ row1, row2 ]; } ]] /mx:Script mx:Repeater id=rp dataProvider={provider} mx:VBox mx:HBox mx:Label text=Label1:/ local:BoxComp mx:Text text={rp.currentItem.field1}/ /local:BoxComp /mx:HBox mx:HBox mx:Label text=Label2:/ mx:Box mx:Text text={rp.currentItem.field2}/ /mx:Box /mx:HBox /mx:VBox /mx:Repeater /mx:Application Component: BoxComp.mxml ?xml version=1.0 encoding=utf-8? mx:Box xmlns:mx=http://www.adobe.com/2006/mxml; /mx:Box Class Dummy: Dummy.as package { [Bindable] public class Dummy { public var field1:String; public var field2:String; public function Dummy() { } } } Just run it and it will crash with error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.controls::[EMAIL PROTECTED] to Array. If you change: local:BoxComp mx:Text text={rp.currentItem.field1}/ /local:BoxComp for: mx:Box mx:Text text={rp.currentItem.field1}/ /mx:Box it works!! Any idea what's going on? Is this a bug? Any ideas to workaround? Thanks, -Paulo
[flexcoders] Re: mx:List with itemRenderer
problem is that im not implementing the drag, the List is --- In flexcoders@yahoogroups.com, Douglas Knudsen [EMAIL PROTECTED] wrote: try capturing whether a drag can occur based on a mouseOver maybe. eg, onMouserOver set canDrag = true if NOT over the footer. Then in your drag handler check this to see if drag is allowed or not. This technique I use usually to make sure the user clicks on the actual object to be dragged, but not outside the object. DK On Wed, Apr 16, 2008 at 9:43 AM, tchredeemed [EMAIL PROTECTED] wrote: any ideas? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, tchredeemed apthorp@ wrote: I have a list that has an itemRenderer. The footer of the itemRenderer can be dragged up or down in order to show/hide data. I want to be able to drag that without triggering the dragHandler for the list. In other words, I want to be able to drag an item from anywhere except the footer to move it inside the list, but if i drag from the footer, i do not want it to trigger. Any ideaS? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Passing query vars to debug url?
Is there a way to specify some query-vars to be passed into the URL I'm debugging inside of Flex Builder? Right now, I click debug and get this URL in the browser: http://localhost/app.swfdebug=true I'd like it to be this: http://localhost/app.swfdebug=trueid=35 If I just type that in, the debugger detaches (because the page reloads), etc... Surely this is possible...? Troy.
[flexcoders] Collections with common source
Hi I'm working on a dashboard where several charts share common data. I was thinking that each chart series could have a data provider which is a collection with a filter function, and I could set the source array of these collections to the same array. Sound reasonable? Thanks
[flexcoders] Re: Building XML out of an Array Collection
Depending on the dot net webservice, you might only need to change your resultFormat=e4x. Try that before you start doing this manually. I am consuming dot net webservices this way. The WS code response.writes a DataTable, and .net serializes it into XML automatically. What you get in flex is a bit messy, with a lot of type info, but your data will be at DocumentElement Tracy --- In flexcoders@yahoogroups.com, Nate Pearson [EMAIL PROTECTED] wrote: I gotcha! So what about adding children to that xml node? Do you treat it just like a string or something? so If I wanted to add a child to that node would it be something like this: var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]} newNode = newNode + myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ I thought I saw some method called append in xml. I was hoping I could create XMLNode(s) and do something like newNode.append (myNewXMLNode) thanks for responding so fast! --- In flexcoders@yahoogroups.com, Jim Hayes jim@ wrote: You can write the values straight into the xml notation using curly brackets : something like var newNode:XML = myNode label={yourCollection[n][label]} id={ yourCollection[n][id]}/ not sure I have the arrayCollection syntax correct, but hopefully you can see what I mean? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: 16 April 2008 16:59 To: flexcoders@yahoogroups.com Subject: [flexcoders] Building XML out of an Array Collection I'm trying to change an array collection of typed objects from a .NET webservice into XML. My array collection is like this: myNode{ label:String id:int children:ArrayCollection } The items in the children array collection are more of myNode. I want to put it into xml so it looks like this: myNodes myNode label=test1 id=1/ myNode label=test2 id=2 myNode label=test3 id=3/ myNode label=test4 id=4/ myNode label=test5 id=5/ /myNode myNode label=test6 id=6/ /myNodes I always work with arraycollections and never with xml, but this situation requires it. I just need to know how to start. I can loop through my arraycollection tree if I just know how to do a node or two. THANKS! :) Nate __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] Re: Bind to Dynamic Component or Panel
I would instead advise that when you create the child, you place a reference to it in some kind of dictionary structure, like an array, an associative array(object), or dictionary. Use that reference to access public members, add event listeners, etc. You will not need to worry about where it is in the dom. Tracy --- In flexcoders@yahoogroups.com, gjessup1 [EMAIL PROTECTED] wrote: Oscar, Thanks for that. That is basically exactly what I needed. The one problem I am running into is that I want my panels to be only 3 wide on the page and I have 12 entries in the DB. So I am creating a page 3 panels wide and 4 panels down. To do this I create a new HBOX every 3rd Panel. so I need a way to figure out which HBOX the panel is in. Then I can do HBOX3.getChildByName(My Panel) The way I am starting to do this is by creating an array collection that keeps the Panel Names and the childIndex for the HBOX and the Panel. What would be nice is if you had a Canvas and and it didn't matter how many levels deep the panel was (i.e the panel had a global bindable name) Then you could do Canvas.getChildByName. I can post code if that doesn't make sense.
[flexcoders] Re: combobox
Huh? Use a few more words, please. Tracy --- In flexcoders@yahoogroups.com, Marwan [EMAIL PROTECTED] wrote: How can I bind my day combobox using for operator ?? thanks
Re: [flexcoders] Collections with common source
I've used that approach many times. Store the data in a central model, views each have a local ArrayCollection with a filterFunction and the source set to the data in the model. On Wed, Apr 16, 2008 at 12:37 PM, Richard Rodseth [EMAIL PROTECTED] wrote: Hi I'm working on a dashboard where several charts share common data. I was thinking that each chart series could have a data provider which is a collection with a filter function, and I could set the source array of these collections to the same array. Sound reasonable? Thanks
[flexcoders] Re: Flex Compenents, how to make them talk
Below is a discussion of inter-component communication. I never polished it up, but it will be some value anyway. Tracy Communicating between Components: Note: for loose coupling use events. But that is another topic. A non-trivial flex application is component based. While all of the built-in controls are components, the question of communicating between components most often arises when you are using a custom component. A custom component, whether implemented in mxml or ActionScript, has its own scope. Within that component (Application is a component too!), all sibling child controls share the same scope, so you can refer to controls by their id. If the controls (components) have public properties or methods, you can reference those members directly through the id: mx:TextInput id=textinput1 text=test value .../ mx:Text id=text1 ... text={textinput1.text} .../ Ok, so far, its a duh right? When you use custom components in a Flex app, at run time they make a document object model hierarchy (DOM). Each subcomponent has its own scope and code within that component can't *directly* reference the member properties or methods of its sibling subcomponents. So again, within a component, code can reference children directly, as in the example above. But there are two other cases inherent in a hierarchy. You might want to reference up, to get to public members of the parent, grandparent, etc, or 'down, to get to a grandchild. Accessing members in the parent: On an ordinary component DOM, you can reference the parent component using the .parent property. Say that a control with id=textinput1 exists in the parent of the current component. then you could do: mx:Text id=text1 ... text={parent.textinput1.text} .../ Accessing members in the main application: Components can be nested, sometimes very deeply. If the reference you want is all the way at the top-level, main application (the one with the mx:Application tag), you could do {parent.parent.parent.textinput1.text}, but you would have to count the component levels just right. Instead, you can use Application.application to get to that scope: mx:Text id=text1 ... text={Application.application.textinput1.text} .../ You can shoretn this style of reference by importing mx.core.Application, and assigning Application.application to a variable, like _app, the doing (_app.textinput1.text) Accessing components of a child component (grandchildren): Say that in this case, a child component has the TextInput control you want to reference. First, make sure the child component has an id: myComp:MyCustomComp id=mycc1 .../ Then, in the same scope (the same component/file that contains mycc1 above) you can say: mx:Text id=text1 ... text={mycc1.textinput1.text} .../ Accessing a nested component: As mentioned above you can go up the hierarchy using parent.parent You can also go down the hirearchy using id references: mx:Text id=text1 ... text={mycc1.mycc11.mycc.12.textinput1.text} .../ Additional notes: If you are using SWFLoader to load an entire Application, you can reference the immediate parent application using parentDocument. You can also use Application.application to reach the main app, as shown above. Accessing members of an application loaded by SWFLoader is a bit more complicated. See the example here: http://www.cflex.net/showFileDetails.cfm?ObjectID=690
Re: [flexcoders] A Question about Cairngorm?
It's really just a few steps: 1. Have your commands implement mx.rpc.IResponder, and define result and fault methods in the command. 2. Call the service directly from the execute() method of the command. 3. When you call the service, it returns an ASyncToken, and you can set the Command to act as the responder by setting token.addResponder(this). So your command class will look something like this: import mx.rpc.AsyncToken; import mx.rpc.IResponder; public class InitAppCommand implements ICommand, IResponder { public function InitAppCommand(event:CairngormEvent) { } public function execute(event:CairngormEvent):void { var service:* = ServiceLocator.getInstance().getRemoteObject( myService ) ; var token:AsyncToken = service.someMethod(); token.addResponder(this); } public function result(data:Object):void { } public function fault(info:Object):void { } } On Wed, Apr 16, 2008 at 10:33 AM, markflex2007 [EMAIL PROTECTED] wrote: Hi, I work with Cairngorm for couple months. I use delegate to connect with Server and use command to get the data from delegate. Now the delegate file and command file are separate files. Somebody told me I can combine delegate with command so I do not need to build so many file. Do you know some demo online to do this? so I see how to do this. Thanks for your help. Mark
Re: [flexcoders] Re: mx:List with itemRenderer
check out this post http://blog.flexmonkeypatches.com/2008/03/24/nested-item-renderers-with-scrollbars-and-drag-and-drop-enabled-scroll-dont-drag-please/ it describes a similar problem and i think it might help with what you are trying to do. the idea is to use stopImmediatePropogation() to not trigger the drag of the main list from the item renderer. d. On Wed, Apr 16, 2008 at 1:22 PM, tchredeemed [EMAIL PROTECTED] wrote: problem is that im not implementing the drag, the List is --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Douglas Knudsen [EMAIL PROTECTED] wrote: try capturing whether a drag can occur based on a mouseOver maybe. eg, onMouserOver set canDrag = true if NOT over the footer. Then in your drag handler check this to see if drag is allowed or not. This technique I use usually to make sure the user clicks on the actual object to be dragged, but not outside the object. DK On Wed, Apr 16, 2008 at 9:43 AM, tchredeemed [EMAIL PROTECTED] wrote: any ideas? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, tchredeemed apthorp@ wrote: I have a list that has an itemRenderer. The footer of the itemRenderer can be dragged up or down in order to show/hide data. I want to be able to drag that without triggering the dragHandler for the list. In other words, I want to be able to drag an item from anywhere except the footer to move it inside the list, but if i drag from the footer, i do not want it to trigger. Any ideaS? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Dynamically Resizing
Greetings, I'm new to flex coding and what I'm trying to do with my current project is automatically resize panes (canvases?) by mouse actions like mouseover. I need to use percentages because I want the total width to be 100% regardless of the browser size. I've written an actionscript module and I'm trying to use ObjectName.width, but it only takes a number as an argument. This is probably a silly question and the answer is probably easy. Thanks a bunch for all your help. Mel
[flexcoders] Re: mx:List with itemRenderer
If you use the default code, you are stuck with the default behavior. But go on and implement the handlers yourself. It is really pretty easy once you get the hang of it, and you have complete control over what happens and when, and how it looks. I just did this a few days ago. There are good examples in the docs. Below is one of my handlers as an example. Tracy private function onDragOverProjContacts(event:DragEvent):void { if (event.dragSource.hasFormat(items)) { event.preventDefault(); var dgDragInit:DataGrid = DataGrid(event.dragInitiator); if (dgDragInit.id == dgProjUsers) { DragManager.showFeedback(DragManager.MOVE); DragManager.acceptDragDrop(DataGrid (event.currentTarget)); } else if (dgDragInit.id == dgSiteContacts) { //ADD from site contacts if (noDuplicate(event.dragSource)) { DragManager.showFeedback(DragManager.COPY); DragManager.acceptDragDrop(DataGrid(event.currentTarget)); } else { DragManager.showFeedback(DragManager.NONE); } } } }//onDragOverProjContacts
Re: [flexcoders] Dynamically Resizing
use percentWidth and percentHieght On Wed, Apr 16, 2008 at 12:46 PM, meltonianweb [EMAIL PROTECTED] wrote: Greetings, I'm new to flex coding and what I'm trying to do with my current project is automatically resize panes (canvases?) by mouse actions like mouseover. I need to use percentages because I want the total width to be 100% regardless of the browser size. I've written an actionscript module and I'm trying to use ObjectName.width, but it only takes a number as an argument. This is probably a silly question and the answer is probably easy. Thanks a bunch for all your help. Mel -- http://grumpee.instantspot.com/blog
[flexcoders] Re: PopUpButton issue
Doing it on addedToStage event somehow doesn't work well for my app. My app kept on crashing due to a null popUp. Instead of doing it on addedToStage, I did in removedFromStage event. This prevents the crashing problem completely. Waiting for Flex3 HotFix. --- In flexcoders@yahoogroups.com, Scott Melby [EMAIL PROTECTED] wrote: I have a PopUpButton on which I am setting a Menu as the popUp property. I have found that the popUp attribute is being nulled when the PopUpButton is removed from the stage... which causes my button to not function properly when added back to the stage. I traced the issue to the following code in PopUpButton.as which appears to be incorrect. In this code the _popUp member (backing for the popUp setters and getters) is nulled. private function removedFromStageHandler(event:Event):void { // Ensure we've unregistered ourselves from PopupManager, else // we'll be leaked. if (_popUp) { PopUpManager.removePopUp(_popUp); _popUp = null; } } To workaround this issue I had to listen for the addedToStage event in my view that uses this component and re-set the popUp property each time as follows. /** * Called each time this view is added to the stage. We need this to work * around an issue where the PopUpButton has a null popUp * property each time it has been removed from the stage. */ public function handleAddedToStage():void{ if(this.createButton != null this._buttonMenu != null){ this.createButton.popUp = _buttonMenu; } } Has anybody else seen this? Can somebody please let me know if this is a bug in the toolkit? The workaround works fine... but seems like it should not be necessary. Thanks Scott -- Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com
[flexcoders] A Question about Cairngorm?
Hi, I work with Cairngorm for couple months. I use delegate to connect with Server and use command to get the data from delegate. Now the delegate file and command file are separate files. Somebody told me I can combine delegate with command so I do not need to build so many file. Do you know some demo online to do this? so I see how to do this. Thanks for your help. Mark
Re: [flexcoders] Collections with common source
Thanks. I also have a couple of cases involving stacked column series, where I wonder if I should build a custom implementation of IList or ICollectionView. eg. the raw data has an integer (representing an enum). There is a column series for each enum value. I can either use the filter technique to make a data provider corresponding to each value of the enum. Or I can have a single custom collection which returns an object with a property for each value of the enum, and use yField. Any experience reports on the relative efficiency of these two approaches would be much appreciated. I find myself wishing collections supported a mapper function in addition to a filter function. On Wed, Apr 16, 2008 at 10:42 AM, Daniel Gold [EMAIL PROTECTED] wrote: I've used that approach many times. Store the data in a central model, views each have a local ArrayCollection with a filterFunction and the source set to the data in the model. On Wed, Apr 16, 2008 at 12:37 PM, Richard Rodseth [EMAIL PROTECTED] wrote: Hi I'm working on a dashboard where several charts share common data. I was thinking that each chart series could have a data provider which is a collection with a filter function, and I could set the source array of these collections to the same array. Sound reasonable? Thanks
[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.
RE: [flexcoders] Calling http services in separate file
Implement this as data model, using a bindable singleton. Keep the result data in that object. Implement public properties and methods to control the functionality. Bind the UI to the model's properties. I just used this technique for the first time myself, and it rocks. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ghus32 Sent: Wednesday, April 16, 2008 12:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Calling http services in separate file Hello Everyone, I want to clean up my code and put all of my http services in a separate mxml file.. how would I call these at runtime?? Thanks
RE: [flexcoders] Re: AIR: Forcing a file to be opened By OS Default Application
Understandably Adobe is feeling rather conservative about this sort of thing. The last thing we as developers would want is an abuse of the AIR runtime which sullies its reputation. So we're getting a certain sandbox to play in. However, opening a document file such as a word doc, pdf or excel spreadsheet is a normal every day activity. The OS and the user already have responsibility to ensure that they are not accessing malicious content. IMO, letting AIR have a somewhat larger sandbox by passing to the OS a request to open files would be a huge step forward and make the user experience significantly better. For example, the AIR application I just built downloads data entitlements to a user's machine. Once downloaded, the user needs to navigate to that directory using the OS to open the files. It would be nice to not requre all that additional work on the part of the user. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of aphexyuri Sent: Wednesday, April 16, 2008 12:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AIR: Forcing a file to be opened By OS Default Application Jeff, We've been looking into it as well. Maybe the following links could give you some more help: http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integra tion-proof-of-concept/ and http://www.mikechambers.com/blog/2008/01/22/commandproxy-its-cool-but-is -it-a-good-idea/ It's a long shot a workaround...something adobe really needs to address soon! --- In flexcoders@yahoogroups.com, Battershall, Jeff [EMAIL PROTECTED] wrote: Steve, In the scenario I'm envisioning, I am not thinking that AIR would be starting the program itself but the OS would, as it would in response to a double click on a file name in Windows Explorer. But if it can't be done, it can't be done. Jeff -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cutter (Flex Related) Sent: Wednesday, April 16, 2008 10:32 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AIR: Forcing a file to be opened By OS Default Application According to a talk that Ben Forta gave here in Nashville, not long before product launch, the AIR sandbox strictly prohibits access to other programs on a system. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] other ways to read html content inside flex
Hi Coders. There is other proven method to read html content rather than i-frames? I couldn't find my way there something in the code that I 've just don't get it, so I know there should be other way to do this. any ideas? Regards Gustavo
RE: [flexcoders] Passing query vars to debug url?
Go menu, Run, Run, Other. Select the app you want to work with. Uncheck UseDefault, and add your parameters to the Debug line. Apply, then debug. I would like a way to have multiple startup configurations for the same app, but have not found how to do that. Maybe creating a wrapper for each configuration would wok. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of thirtyfivemph Sent: Wednesday, April 16, 2008 1:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing query vars to debug url? Is there a way to specify some query-vars to be passed into the URL I'm debugging inside of Flex Builder? Right now, I click debug and get this URL in the browser: http://localhost/app.swfdebug=true http://localhost/app.swfdebug=true I'd like it to be this: http://localhost/app.swfdebug=trueid=35 http://localhost/app.swfdebug=trueid=35 If I just type that in, the debugger detaches (because the page reloads), etc... Surely this is possible...? Troy.
Re: [flexcoders] RegExp searching for [ and ], are they reserved?
just bumping this one up there, it is critical for my app to do this and I see no way past it. anybody ever needed to find content with regex that contained [] characters? thanks, d. On Wed, Apr 16, 2008 at 10:01 AM, Derrick Anderson [EMAIL PROTECTED] wrote: hey i'm not a regex pro by far which is why i asked if my regex was wrong- but taking your suggestion it still does not work- not sure why. i've used the RegExr air app to test this and the simplest i can get it is new RegExp(\[[^]*\],igm); this works when {} are used but not when [] is used, you can see in the example below- it looks like escaping the [] is affecting the match (although it works fine in the regex test tool). ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var mergeRE:RegExp = new RegExp(\[[^]*\],igm); private var mergeRE2:RegExp = new RegExp({[^]*},igm); public function runSquareBracketTest():void { var response:Array = subjectString.text.match(mergeRE); resultString.text = response.toString(); } public function runCurlyBracketTest():void { var response:Array = subjectString.text.match(mergeRE2); resultString.text = response.toString(); } ]] /mx:Script mx:VBox mx:TextArea id=subjectString width=400 height=200 mx:text ![CDATA[strong[Employee First Name] /strong strong{Employee Last Name} /strong]] /mx:text /mx:TextArea mx:TextArea id=resultString width=400 height=200 / mx:Button click=runSquareBracketTest(); label=Get first name. / mx:Button click=runCurlyBracketTest(); label=Get last name. / /mx:VBox /mx:Application On Tue, Apr 15, 2008 at 4:33 PM, Gordon Smith [EMAIL PROTECTED] wrote: I'm confused... why isn't your pattern something like \[.*]\] ? What's going on with the ^ and the ? What is supposed to match against letters like E, m, p, l, etc.? Gordon Smith Adobe Flex SDK Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Anderson *Sent:* Tuesday, April 15, 2008 1:23 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] RegExp searching for [ and ], are they reserved? i had tried escaping them, below i've pasted an example of my problem- 2 samples: 1 looking for [Employee First Name] and one looking for {Employee First Name} (curly braces vs square braces) and even though the brackets are escaped, the regex with [ and ] only return the ending ]. do i have the regex wrong? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var mergeRE:RegExp = new RegExp(\[[^]*?\],igm); private var mergeRE2:RegExp = new RegExp({[^]*?},igm); public function runSquareBracketTest():void { var response:Array = subjectString.text.match(mergeRE); resultString.text = response.toString(); } public function runCurlyBracketTest():void { var response:Array = subjectString.text.match(mergeRE2); resultString.text = response.toString(); } ]] /mx:Script mx:VBox mx:TextArea id=subjectString width=400 height=200 mx:text ![CDATA[strong[Employee First Name] /strong strong{Employee Last Name} /strong]] /mx:text /mx:TextArea mx:TextArea id=resultString width=400 height=200 / mx:Button click=runSquareBracketTest(); label=Get first name. / mx:Button click=runCurlyBracketTest(); label=Get last name. / /mx:VBox /mx:Application On Tue, Apr 15, 2008 at 4:08 PM, Gordon Smith [EMAIL PROTECTED] wrote: [ and ] are metacharacters in RegExp patterns. For example, [abc] matches either a, or 'b or c. To prevent this interpretation, escape them with a backslash. Gordon Smith Adobe Flex SDK Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Anderson *Sent:* Tuesday, April 15, 2008 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] RegExp searching for [ and ], are they reserved? hey all, i'm trying to do a replace on a string and replace anything in brackets with something else. so [this] word would get replaced, however in the regex tester at gskinner this works fine (it's flex based regex test tool) but in my local code- i always get unexpected results when my regex
Re: [flexcoders] RegExp searching for [ and ], are they reserved? SOLVED
i think i figured it out, the [ and ] characters have to be double-escaped like so new RegExp(\\[[^]*\\],igm); d. On Wed, Apr 16, 2008 at 2:17 PM, Derrick Anderson [EMAIL PROTECTED] wrote: just bumping this one up there, it is critical for my app to do this and I see no way past it. anybody ever needed to find content with regex that contained [] characters? thanks, d. On Wed, Apr 16, 2008 at 10:01 AM, Derrick Anderson [EMAIL PROTECTED] wrote: hey i'm not a regex pro by far which is why i asked if my regex was wrong- but taking your suggestion it still does not work- not sure why. i've used the RegExr air app to test this and the simplest i can get it is new RegExp(\[[^]*\],igm); this works when {} are used but not when [] is used, you can see in the example below- it looks like escaping the [] is affecting the match (although it works fine in the regex test tool). ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var mergeRE:RegExp = new RegExp(\[[^]*\],igm); private var mergeRE2:RegExp = new RegExp({[^]*},igm); public function runSquareBracketTest():void { var response:Array = subjectString.text.match(mergeRE); resultString.text = response.toString(); } public function runCurlyBracketTest():void { var response:Array = subjectString.text.match(mergeRE2); resultString.text = response.toString(); } ]] /mx:Script mx:VBox mx:TextArea id=subjectString width=400 height=200 mx:text ![CDATA[strong[Employee First Name] /strong strong{Employee Last Name} /strong]] /mx:text /mx:TextArea mx:TextArea id=resultString width=400 height=200 / mx:Button click=runSquareBracketTest(); label=Get first name. / mx:Button click=runCurlyBracketTest(); label=Get last name. / /mx:VBox /mx:Application On Tue, Apr 15, 2008 at 4:33 PM, Gordon Smith [EMAIL PROTECTED] wrote: I'm confused... why isn't your pattern something like \[.*]\] ? What's going on with the ^ and the ? What is supposed to match against letters like E, m, p, l, etc.? Gordon Smith Adobe Flex SDK Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Anderson *Sent:* Tuesday, April 15, 2008 1:23 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] RegExp searching for [ and ], are they reserved? i had tried escaping them, below i've pasted an example of my problem- 2 samples: 1 looking for [Employee First Name] and one looking for {Employee First Name} (curly braces vs square braces) and even though the brackets are escaped, the regex with [ and ] only return the ending ]. do i have the regex wrong? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var mergeRE:RegExp = new RegExp(\[[^]*?\],igm); private var mergeRE2:RegExp = new RegExp({[^]*?},igm); public function runSquareBracketTest():void { var response:Array = subjectString.text.match(mergeRE); resultString.text = response.toString(); } public function runCurlyBracketTest():void { var response:Array = subjectString.text.match(mergeRE2); resultString.text = response.toString(); } ]] /mx:Script mx:VBox mx:TextArea id=subjectString width=400 height=200 mx:text ![CDATA[strong[Employee First Name] /strong strong{Employee Last Name} /strong]] /mx:text /mx:TextArea mx:TextArea id=resultString width=400 height=200 / mx:Button click=runSquareBracketTest(); label=Get first name. / mx:Button click=runCurlyBracketTest(); label=Get last name. / /mx:VBox /mx:Application On Tue, Apr 15, 2008 at 4:08 PM, Gordon Smith [EMAIL PROTECTED] wrote: [ and ] are metacharacters in RegExp patterns. For example, [abc] matches either a, or 'b or c. To prevent this interpretation, escape them with a backslash. Gordon Smith Adobe Flex SDK Team -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Anderson *Sent:* Tuesday, April 15, 2008 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] RegExp
[flexcoders] Re: addEventListener and additional arguments?
Okay then How do I do the simple act of click event call function and pass a parameter value? This was easy in AS1/AS2/JS I could essentially just say... btnFoo.release = function (parameters){...} Now, it looks like i need to add an event listener. Then create a custom event. All so I can pass a number to a function call. Um...can we say asinine? *** Please, some one show me a nice easy way.
[flexcoders] Well, that does me absolutely no good....unless you can show me how to do this!
?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ private var foo:int = 7; private function clickHandler(event:MouseEvent,arg1):void { trace(foo); foo.width = foo.width * arg1; } ]] /mx:Script mx:Button id=btn1 click=clickHandler(event,1)/ mx:Button id=btn2 click=clickHandler(event,2)/ mx:Button id=btn3 click=clickHandler(event,3)/
[flexcoders] Click Lite: The right click now. But not now?
Why does click work here? mx:Button id=btnFoo label=Foo x 2 click=Foo(2)/ But not here? btnFoo.addEventListener(MouseEvent.CLICK,Foo(2)); Now, it's obviously Adobe has coded the button component to allow for arguments to be passed via the click parameter. But we're not given that same privilege when using just AS3. But obviously, they must have already coded this functionality. I'd rather not have to re-invent the horse. Any answers?
Re: [flexcoders] Passing query vars to debug url?
Go menu, Run, Run, Other. Select the app you want to work with. Uncheck UseDefault, and add your parameters to the Debug line. Apply, then debug. I remembered that dialog right after I posted... and made the changes exactly as you described. Thanks. I would like a way to have multiple startup configurations for the same app, but have not found how to do that. Maybe creating a wrapper for each configuration would wok. You can do that, actually... when I ran across this dialog previously I had unintentionally created some additional debug configurations... can't remember how I did it, but there should be somewhere in the UI that you can add a new configuration (and it then appears in the list along-side each app). Troy.
[flexcoders] Redirects and popup blockers
I've been wrestling with this and can't find a solution that seems to work as consistently as what others have found... I've got an embeddable version of my app (think YouTube video) and want the user to be able to click on a button in the app and be sent to our site (just like they clicked on a link on a webpage). I don't care if it pops up a new window (target=_blank) or replaces the current (target=_top). My problem is that whichever I choose seems to trigger the popup blocker in different situations on different browsers. Is there a good universal way to give the user a link inside of Flex that functions equivalently (when clicked) to a link on the surrounding webpage? Troy.
[flexcoders] BlazeDS/LCDS on Glassfish (TomcatLoginCommand issue)
Hi, I've been using BlazeDS/LCDS on Glassfish without issues until now. I'm attempting to enable custom authentication using TomcatLoginCommand In order for Tomcat valves to work with Glassfish I had to make modifications to TomcatValve4150 described here: http://wiki.glassfish.java.net/Wiki.jsp?page=FaqTomcatValveConversion That compiled and deployed without problems, I even added logging code to verify the valve is executed each request. My final issue is when I execute ro.setCredentials(u,p) I get the following error on the server: External login command required. Please check your security configuration. I have also verified that TomcatLoginCommand.doAuthentication is not being executed. My security configuration is: security login-command class=flex.messaging.security.TomcatLoginCommand server=Glassfish/ security-constraint id=pos-access auth-methodCustom/auth-method roles rolesalesPerson/role /roles /security-constraint /security Has anyone been able to get custom authentication working with Glassfish? Thanks! Ryan Campbell
[flexcoders] Hide calendar for DateField
Is it possible to hide the datefield's calendar? I couldn't find a property. I tried hiding it with a little canvas but the halo to show the control has focus extends off to the right where the icon for the calendar is. Thanks!
[flexcoders] Hi there,
I dealt with this issue on my blog pretty extensively.. http://thesaj.wordpress.com/2008/02/12/the-nightmare-that-is-_blank-part-ii-help/ Here is an example of what I implemented for the browsers I was testing for (IE, Firefox, Safari, Opera on PC/Mac) http://www.easternstorm.net/sassie/example2/example2-swfobject2.html Note - in my personal usage, I broke up the example into two classes. One for browser detection and one for _blank issues. Note, there are a few caveats: allowScriptAccess needs to be set to always wmode needs to be set to either transparent or opaque - Jason
[flexcoders] question about working with SessionIDs and FDS
Hello all. we are still using fds.swc in our with current customer installs. One customer needs us to use sessionIDs on server calls. We have updated all the remoteObject calls, but I am having issues with the DataServices.fill command. is there a way to dynamically insert the server's sessionID into the fill command? Currently we keep the sessionID inside a userSession object which is bound to the modelLocator for easy access. Any advice would be a big help. thanks Jeff
[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.
RE: [flexcoders] Hide calendar for DateField
I would subclass, grab the buttonDown event at a high priority and call stopImmediatePropagation From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jack_freud Sent: Wednesday, April 16, 2008 12:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Hide calendar for DateField Is it possible to hide the datefield's calendar? I couldn't find a property. I tried hiding it with a little canvas but the halo to show the control has focus extends off to the right where the icon for the calendar is. Thanks!
[flexcoders] Re: BlazeDS/LCDS on Glassfish (TomcatLoginCommand issue)
Instead of server=Glassfish, can you try server=all and let us know if there's anything different? thanks, Mete --- In flexcoders@yahoogroups.com, cyberscriptnet [EMAIL PROTECTED] wrote: Hi, I've been using BlazeDS/LCDS on Glassfish without issues until now. I'm attempting to enable custom authentication using TomcatLoginCommand In order for Tomcat valves to work with Glassfish I had to make modifications to TomcatValve4150 described here: http://wiki.glassfish.java.net/Wiki.jsp?page=FaqTomcatValveConversion That compiled and deployed without problems, I even added logging code to verify the valve is executed each request. My final issue is when I execute ro.setCredentials(u,p) I get the following error on the server: External login command required. Please check your security configuration. I have also verified that TomcatLoginCommand.doAuthentication is not being executed. My security configuration is: security login-command class=flex.messaging.security.TomcatLoginCommand server=Glassfish/ security-constraint id=pos-access auth-methodCustom/auth-method roles rolesalesPerson/role /roles /security-constraint /security Has anyone been able to get custom authentication working with Glassfish? Thanks! Ryan Campbell
RE: [flexcoders] Click Lite: The right click now. But not now?
In MXML, click=Foo(2) really generates the following code: private function btnFoo_clickHandler(event:MouseEvent):void { Foo(2); } btnFoo.addEventListener(MouseEvent.CLICK, btnFoo_clickHandler); What you tried to do in AS was set the listener to be the result of a call to Foo(2) From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason The Saj Sent: Wednesday, April 16, 2008 12:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Click Lite: The right click now. But not now? Why does click work here? mx:Button id=btnFoo label=Foo x 2 click=Foo(2)/ But not here? btnFoo.addEventListener(MouseEvent.CLICK,Foo(2)); Now, it's obviously Adobe has coded the button component to allow for arguments to be passed via the click parameter. But we're not given that same privilege when using just AS3. But obviously, they must have already coded this functionality. I'd rather not have to re-invent the horse. Any answers?
[flexcoders] Re: Hide calendar for DateField
I'm hoping to hide the icon as well, and reduce the size of the halo to just the size of the textbox area. Thanks --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would subclass, grab the buttonDown event at a high priority and call stopImmediatePropagation From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jack_freud Sent: Wednesday, April 16, 2008 12:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Hide calendar for DateField Is it possible to hide the datefield's calendar? I couldn't find a property. I tried hiding it with a little canvas but the halo to show the control has focus extends off to the right where the icon for the calendar is. Thanks!