Re: [flexcoders] Copying xml node attributes
I've not got the code anymore as I'm doing it a different way but I tried something like this: var attributesToCopy:XML = new XML (nodeName attr1=var1 attr2=var2 /); var copyTarget:Xml = new XML (nodeName /); for (attributeName in attributesToCopy.attributes()) { [EMAIL PROTECTED] = [EMAIL PROTECTED]; } for a start the attributes() array that is returned only seems to hold the attribute values not the names. I also don't think the [EMAIL PROTECTED] works. On 10/25/07, Alex Harui [EMAIL PROTECTED] wrote: What does your code look like? -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Giles Roadnight *Sent:* Thursday, October 25, 2007 4:21 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Copying xml node attributes What's the easiest way to copy a load of attributes from one XML node to another? I tried looping over the attributes() array but that didn't seem to work. Thanks -- Giles Roadnight http://giles.roadnight.name
[flexcoders] ExternalInterface script time out problem!
hi everyone, when i use externalinterface to call its container's function, flash player will pop up an exception if the function doesn't return in 15 seconds. i can't try-catch the exception because it's a timer-based async error. any expert know some way to work-around the 15 seconds limit? thank you very much regards yian
[flexcoders] triplot/ternary plotting components ??
i've looked high low (half expecting iLog to have this) but no dice so far. does anybody know of any flex or flash (that is flex usable) triplot/ternary plotting components (triangle plot used in geochemistry, mineralogy, etc.)? thanks
Re: [flexcoders] ExternalInterface script time out problem!
http://livedocs.adobe.com/flex/2/langref/flash/errors/ScriptTimeoutError.html - Original Message - From: icykorpio [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 26, 2007 10:05 AM Subject: [flexcoders] ExternalInterface script time out problem! hi everyone, when i use externalinterface to call its container's function, flash player will pop up an exception if the function doesn't return in 15 seconds. i can't try-catch the exception because it's a timer-based async error. any expert know some way to work-around the 15 seconds limit? thank you very much regards yian -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Question about Video()
Hello, I have attached a netstream to a video and it starts out playing just fine but as soon as the file is done buffering because for some reason it will buffer 100% of the flv it starts to get choppy.. Has anyone ever experienced this? -Christopher
[flexcoders] Re: HotFix 2 breaks web service results of type xsd:anyType
I'm experiencing the same issue using Flex 3. Service calls that worked now return null for ResultEvent.result in all of our cases. We've tried to modify the web service to conform as in this link but still are not getting anywhere. https://bugs.adobe.com/jira/browse/SDK-11358 Here's the WSDL and the result: WSDL -- ?xml version=1.0 encoding=UTF-8 ? - wsdl:definitions targetNamespace=http://fimsadmro4.fmr.com:12600/bd/suntrust/BPMProduc tTierWeb/services/BPMXtracService xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:impl=http://fimsadmro4.fmr.com:12600/bd/suntrust/BPMProductTier Web/services/BPMXtracService xmlns:intf=http://fimsadmro4.fmr.com:12600/bd/suntrust/BPMProductTier Web/services/BPMXtracService xmlns:tns1=http://xtrac.service.productTier.fims.fmr.com; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; - !-- WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT) -- - wsdl:types - schema targetNamespace=http://xtrac.service.productTier.fims.fmr.com; xmlns=http://www.w3.org/2001/XMLSchema; element name=execute type=xsd:anyType / /schema - schema targetNamespace=http://fimsadmro4.fmr.com:12600/bd/suntrust/BPMProduc tTierWeb/services/BPMXtracService xmlns=http://www.w3.org/2001/XMLSchema; element name=executeReturn type=xsd:anyType / /schema /wsdl:types - wsdl:message name=executeResponse wsdl:part element=intf:executeReturn name=executeReturn / /wsdl:message - wsdl:message name=executeRequest wsdl:part element=tns1:execute name=part / /wsdl:message - wsdl:portType name=XtracAdaptor - wsdl:operation name=execute wsdl:input message=intf:executeRequest name=executeRequest / wsdl:output message=intf:executeResponse name=executeResponse / /wsdl:operation /wsdl:portType - wsdl:binding name=BPMXtracServiceSoapBinding type=intf:XtracAdaptor wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / - wsdl:operation name=execute wsdlsoap:operation soapAction= / - wsdl:input name=executeRequest wsdlsoap:body use=literal / /wsdl:input - wsdl:output name=executeResponse wsdlsoap:body use=literal / /wsdl:output /wsdl:operation /wsdl:binding - wsdl:service name=XtracAdaptorService - wsdl:port binding=intf:BPMXtracServiceSoapBinding name=BPMXtracService wsdlsoap:address location=http://fimsadmro4.fmr.com:12600/bd/suntrust/BPMProductTierWe b/services/BPMXtracService / /wsdl:port /wsdl:service /wsdl:definitions RESULT -- ?xml version=1.0 encoding=utf-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body executeResponse LoginResponseCookie/Cookie/LoginResponse /executeResponse /soapenv:Body /soapenv:Envelope --- In flexcoders@yahoogroups.com, pcolby_flex [EMAIL PROTECTED] wrote: This is a major headache for me!! :( I have a number of Flex applications that access web services that return results as type xsd:anyType (the results are complex XML hierarchies that change according to db values). Before HotFix 2, in my ResultEvent.RESULT event handler, I could get access to the result as an AS Object via the ResultEvent.result property. But since HotFix 2, the ResultEvent.result property is always null for web services results of type xsd:anyType (for other result types, ResultEvent.result is correct). I have to use Hotfix 2 for other fixes that were included, but can't live without web-servcies! Does anyone have any suggestions? Flex Builder 3 Beta 1 has exactly the same problem :( Paul C.
[flexcoders] Re: getElementByID equivalent
Hi Tracy, Thanks for the response. But i am constructing a string called Button1, Button2 ... ButtonN and I want to access the element with the id in mxml document called Button1 which gives me a type error. So, how can i remove the type error from the following peice of code? // assuming id's with names Button1 - ButtonN exist var buttonName:String; buttonName = ; for( var i:Number = 1; i = N ; i++) { buttonName = Button+i; buttonName.height = buttonName.height + 10; // What is the right way to set it in flex? // In JS I would use getElementById(buttonName).height // What should I use in AS/Flex? } Any help is appreciated. Thanks, -S- --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Yes, as long as the components are in scope and you have instantiated them using mxml tags, you can get a reference to them using the id property. So you can say: button1.height = button1.height + 10; or whatever property you want to set. If you have instantiated them using AS addChild, it is a bit more difficult. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suman.karumuri Sent: Thursday, October 25, 2007 5:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] getElementByID equivalent Hi all, I am a flex noob. I am writing an application in which I have to change the height and width of the buttons and other elements in a VBox based on some user action. To do this, I have assigned id's like button1, button2 .. to the buttons, I want to modify when the user clicks on a button. I want to know if there is a method like getElementById(as in JS) in flex using which I can get the object reference given an ID. That way I hope to manipulate the buttons and many other elements on the screen easily. Any pointers are appreciated? Or is there a better way to do it? Thanks in advance, -S-
[flexcoders] LCDS out of range sequence and hibernate proxy errors
Has anyone seen the following error: [Flex] Attempt to subscribe to out of range sequence: 4 clientId: 4AE7. I'm getting a boatload of these (w/ different seq numbers and client IDs) when there are multiple browsers connected to my server and I start recycling the browsers. I'm using LCDS 2.5.1, one RTMP channel with many destinations, and the hibernate assembler. It acts like something isn't being cleaned up when a previous client disconnects. Often times after a handful of these come out I get the following error: 20:53:43,877 ERROR [LazyInitializationException] could not initialize proxy - the owning Session was closed org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyIniti\ alizer.java:60) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLa\ zyInitializer.java:111) at flex.data.assemblers.HibernatePropertyProxy.getHibernateProxyValue(Hiber\ natePropertyProxy.java:60) at flex.data.assemblers.HibernatePropertyProxy.getAlias(HibernatePropertyPr\ oxy.java:67) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:533) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243\ ) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:549) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:800) at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:431) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:179) at flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:243\ ) at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:549) at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:518) at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193) at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:181) at flex.messaging.io.tcchunk.TCCommand.getCommandResponse(TCCommand.java:42\ 0) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac\ tRTMPServer.java:1013) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo\ nnection.java:435) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker\ .runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker\ .run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) I understand Hibernate lazy initialization problems but I'm not explicitly accessing a relationship that isn't loaded. Could these two errors be related with some kind of cleanup/termination situation? Any thoughts? Thanks.
[flexcoders] Flex Builder and Tab Sizes...
Hey all- Has anyone had any issues with FB3 or FB2 and setting a tab size different then 4? I set it to 2, but it still comes out as 4. Anyone else have that problem? - Kevin
Re: [flexcoders] Re: Looking for horizontal sliding list/dialog component (like iPhone UI)
I'm looking for the same kinda thing...make any progress on this? On 10/20/07, andiboarder [EMAIL PROTECTED] wrote: Hi! Try using a ViewStack that use WipeRight and WipeLeft effects when hiding and showing a new selectedIndex. This should be a starting point. Thanks, but the problem is, this will not slide the new content in, it will just reveal it. What I need is something like what the accordion does. I took a look at the HAccordion implementation, but it seems to be rather complicated (at least the code there). I'm wondering that there is no component out there, which does this. It is not too exotic. I could have a look at how the IUI iPhone Ajax UI implementation does the sliding, but Flex is to different from JS/HTML to transfer the principles from there...
Re: [flexcoders] Re: getElementByID equivalent
this[buttonName].height = On Oct 26, 2007, at 12:14 AM, suman.karumuri wrote: Hi Tracy, Thanks for the response. But i am constructing a string called Button1, Button2 ... ButtonN and I want to access the element with the id in mxml document called Button1 which gives me a type error. So, how can i remove the type error from the following peice of code? // assuming id's with names Button1 - ButtonN exist var buttonName:String; buttonName = ; for( var i:Number = 1; i = N ; i++) { buttonName = Button+i; buttonName.height = buttonName.height + 10; // What is the right way to set it in flex? // In JS I would use getElementById(buttonName).height // What should I use in AS/Flex? } Any help is appreciated. Thanks, -S- --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Yes, as long as the components are in scope and you have instantiated them using mxml tags, you can get a reference to them using the id property. So you can say: button1.height = button1.height + 10; or whatever property you want to set. If you have instantiated them using AS addChild, it is a bit more difficult. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of suman.karumuri Sent: Thursday, October 25, 2007 5:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] getElementByID equivalent Hi all, I am a flex noob. I am writing an application in which I have to change the height and width of the buttons and other elements in a VBox based on some user action. To do this, I have assigned id's like button1, button2 .. to the buttons, I want to modify when the user clicks on a button. I want to know if there is a method like getElementById(as in JS) in flex using which I can get the object reference given an ID. That way I hope to manipulate the buttons and many other elements on the screen easily. Any pointers are appreciated? Or is there a better way to do it? Thanks in advance, -S- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links
Re: [flexcoders] Flex2Gateway Security Question
by default you can only invoke remote functions, not public ones. To allow public functions to be called from a flex front-end you need to change de configuration of the ColdFusion destination. Check the remoting-config.xml if you have the method-access-level property set to remote. To allow both public and remote this value is set to 'public and remote'. -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
Re: [flexcoders] crossdomain.xml... real or not-so-real security?
The use case I've heard that makes sense to me that does provide security is this. Say you have a bunch of FLVs stored on your server and you let some people access those from their site. And at some point you discover that someone has been abusing that privilege and racking up huge bandwidth charges for you. So you add the cross domain and deny access to certain sites. Then you can still stream them out, but the friend that posted it to slashdot is no longer able to. Make sense? It's not a lot of security in my opinion, but it works. There are ways around it, like proxies, but then those people will be using the bandwidth themselves as well. On Oct 26, 2007, at 8:26 AM, geoffreymina wrote: Say there is a site which has a crossdomain.xml defined: http://www.foo.com/crossdomain.xml with allow-access-from domain=*.foo.com/ If I were to load an SWF file on my internal webserver and create a local host file which contained an entry for fake.foo.com could I then load the SWF file from fake.foo.com and access data on www.foo.com? If this is the case, then it seems to me that crossdomain.xml is really just something to make people feel warm and fuzzy... and not at all a real security measure. Thanks, Geoff -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com Yahoo! Groups Links
[flexcoders] Foreign Language Characters
I'm still trying to find the best way to allow my users to enter foreign language characters - like á, ñ, etc. - into my flex text controls. Has anyone had experience with this, or found a solution that makes it somewhat easy on the end user? I've noticed that holding alt and typing the codes for the keys does not work, which makes me think I'm going to run into problems. Thoughts? Shaun
[flexcoders] Flex2Gateway Security Question
OK, I have come across something that I find VERY disturbing. It appears that the Flex2Gateway can invoke any access=remote or access=public CFFunction. I have developed a very large OO application for use with a Flex front end. My gateway components are all declared with remote access functions but their roles are properly set to NOT allow unauthorized access. The model objects all have their methods declared public with no roles defined... because, well, i assumed they couldn't be invoked directly from the web. Does anyone know if it is possible to change the scope of what the Flex2Gateway will allow access to? Perhaps I am off base here... maybe there is some higher level security which I am missing. Thanks, Geoff
[flexcoders] Re: Large number coming back from Web Service is getting converted
Sorry, this is with Flex 3 milestone 2. --- In flexcoders@yahoogroups.com, cheftimbob [EMAIL PROTECTED] wrote: We have a web service that returns a large numeric value that is approximately 30 spaces wide. EG: somevalue 123456789987654321123456789000 /somevalue When we view the response of this value using ResultEvent.result.somevalue, we're getting back something like this: 1.23456789987e+29 We need to use this value as a string that we pass back up on other web service calls where it's examined. Even if we convert it back somehow from this scientific notation value, we loose data. We've tried specifying in the wsdl that this is a string with the same results.
[flexcoders] Re: Flex Builder 3 and Coldfusion 8 with LCDS
LCDS is LCDS, it's just integrated with CF. You use it the same as you would any other install of LCDS. Create a Flex project of type LCDS and point it at your CF install. --- In flexcoders@yahoogroups.com, Randy Martin [EMAIL PROTECTED] wrote: I'm talking about the LCDS that comes with CF8, the one you can opt to install when you're doing the upgrade from CF7 to CF8. What wizard are you talking about? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Chiverton Sent: Thursday, October 25, 2007 7:37 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Flex Builder 3 and Coldfusion 8 with LCDS On Thursday 25 Oct 2007, [EMAIL PROTECTED] wrote: Does anyone have an answer to this? Please. :) Download the Builder trial and run the wizard ? -- Tom Chiverton Helping to quickly seize killer applications 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 St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The 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 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links No virus found in this outgoing message. Checked by AVG. Version: 7.5.503 / Virus Database: 269.15.10/1091 - Release Date: 10/24/2007 2:31 PM
Re: SPAM-LOW: [flexcoders] Re: Flex2Gateway Security Question
It's server side, but you'll only find it in CF8, I believe. CF7 has all the info in one file. geoffreymina wrote: Thanks for the answer. I only have the services-config.xml where is the remoting-config.xml file? Is this server side, or client side? Thanks, Geoff --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: by default you can only invoke remote functions, not public ones. To allow public functions to be called from a flex front-end you need to change de configuration of the ColdFusion destination. Check the remoting-config.xml if you have the method-access-level property set to remote. To allow both public and remote this value is set to 'public and remote'. -- João Fernandes http://www.onflexwithcf.org http://www.onflexwithcf.org http://www.riapt.org http://www.riapt.org -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Large number coming back from Web Service is getting converted
We have a web service that returns a large numeric value that is approximately 30 spaces wide. EG: somevalue 123456789987654321123456789000 /somevalue When we view the response of this value using ResultEvent.result.somevalue, we're getting back something like this: 1.23456789987e+29 We need to use this value as a string that we pass back up on other web service calls where it's examined. Even if we convert it back somehow from this scientific notation value, we loose data. We've tried specifying in the wsdl that this is a string with the same results.
[flexcoders] Re: Flex2Gateway Security Question
Thanks for the answer. I only have the services-config.xml where is the remoting-config.xml file? Is this server side, or client side? Thanks, Geoff --- In flexcoders@yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: by default you can only invoke remote functions, not public ones. To allow public functions to be called from a flex front-end you need to change de configuration of the ColdFusion destination. Check the remoting-config.xml if you have the method-access-level property set to remote. To allow both public and remote this value is set to 'public and remote'. -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] FLV Recorded stream contains strange additional blank space / frames
Hi there We're recorded a series of flv files using getCamera() Red5. Some of our recorded flv's have a chunk of dead video space at the begining. Using RichFLV to analyze the timeline, one can see a few key frames, then a huge chunk of blank space spanning for about 1 minute, then continuing key-frames that follow on from the initial keyframes. This throws out our cue-point calculations because it offsets the video playback time. Help! Tracy
Re: [flexcoders] Re: Flex2Gateway Security Question
services-config.xml is the right file, i think remoting-config is for when using LCDS but i'm not really sure on that, look for method-access-levelremote/method-access-level in your destination definition. On 10/26/07, geoffreymina [EMAIL PROTECTED] wrote: Thanks for the answer. I only have the services-config.xml where is the remoting-config.xml file? Is this server side, or client side? Thanks, Geoff --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, João Fernandes [EMAIL PROTECTED] wrote: by default you can only invoke remote functions, not public ones. To allow public functions to be called from a flex front-end you need to change de configuration of the ColdFusion destination. Check the remoting-config.xml if you have the method-access-level property set to remote. To allow both public and remote this value is set to 'public and remote'. -- João Fernandes http://www.onflexwithcf.org http://www.riapt.org
[flexcoders] datagridcolumn input filter
I have a datagridcolumn with which I only want the user to enter numerical data. I do not wish to use an itemrenderer. How can I do this please?
[flexcoders] Pulling in a webpage
Anyone have any hints on how to do something like this? I need to be able to pull in a webpage to my flex application. I need the ability to place a flex component (button, graph, whatever) on top of it. I have seen some iframe solutions but can't place a that component over it. I was thinking of getting the bytes and creating a dynamic bitmap but then I dont how do get the btyes. anyone? thanks Ralph
Re: [flexcoders] datagridcolumn input filter
I have not used this component http://weblogs.macromedia.com/pent/archives/2006/08/flex_2_componen.cfm but it looks like you could use it as your item editor. If you don't want to mask input, but just want to validate that it is all numeric during the edit or at the end you could use a validator http://blog.fastlanesw.com/?p=19 during the itemEditEnd processing as I describe on my blog. hth Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com candysmate wrote: I have a datagridcolumn with which I only want the user to enter numerical data. I do not wish to use an itemrenderer. How can I do this please?
[flexcoders] Collapse Panel
Hi guys, I extended a collapse panel to add the contraction feature. The problem is that before contracting the panel, its increases its size with the content. However, after contracting the panel it restores your original size that the content area was scrolling.That behavior happens because the height property of the component is configured to a fixed value in the collapseAction method. How can I restore the original height of the panel while maintaining the the increase with the content behavior? override protected function createChildren():void{ super.createChildren(); collapseButtonDown = new Button(); collapseButtonDown.width = 20; collapseButtonDown.height = 20; collapseButtonDown.buttonMode = true; collapseButtonDown.useHandCursor = true; collapseButtonDown.styleName = collapseButtonDown; collapseButtonDown.addEventListener(MouseEvent.CLICK, collapseAction); collapseButtonDown.visible = false; collapseButtonUp = new Button(); collapseButtonUp.width = 20; collapseButtonUp.height = 20; collapseButtonUp.buttonMode = true; collapseButtonUp.useHandCursor = true; collapseButtonUp.styleName = collapseButtonUp; collapseButtonUp.addEventListener(MouseEvent.CLICK, collapseAction); ewsButton = new LinkButton(); ewsButton.label = Send to My EWS; ewsButton.styleName = ewsButton; ewsButton.width = 110; ewsButton.height = 22; ewsButton.visible = false; rawChildren.addChild(collapseButtonDown); rawChildren.addChild(collapseButtonUp); rawChildren.addChild(ewsButton); } private function collapseAction(evt:MouseEvent):void{ collapseButtonUp.visible = (evt.currentTarget.styleName == collapseButtonDown); collapseButtonDown.visible = (evt.currentTarget.styleName == collapseButtonUp); if(collapseButtonDown.visible){ originalHeight = height; height = titleBar.height; }else{ height = originalHeight; originalHeight = 0; } invalidateSize(); } Regards, Eduardo Dias
[flexcoders] Re: Save XML to mySQL and retrieve back to Flex
To get the xml into the database via some server side technology the xml will need to get converted into string format at some point. When you retrieve it from the database via server side tech, it will again be as a string, you will have to convert it back into a proper xml object at some point, either on the server or in the flex client. I don't think there is any way around that. I have done the same thing for many projects and have never had a problem. The database thinks you're saving a huge string (which it is) and actionscript can quickly parse a large xml string back into an XML object very quickly. Go for the easy, clean, quick solution. Derrick - Derrick Grigg www.dgrigg.com --- In flexcoders@yahoogroups.com, Ben Marchbanks [EMAIL PROTECTED] wrote: I have a complex XML object that is constructed in Flex. I would like to store this in mySQL whole in a single field and then retrieve and display the data at a later time in my Flex app. What I would like to avoid is parsing and reconstructing the XML in order to display it again in Flex. Any suggestions or points on how to handle this...
Re: [flexcoders] Button inside a DataGridColumn..is it Possible?
Look into ItemRenderers tarun chandra wrote: Hi I was trying to find ways to put a button inside a dataGridColumn, so that I can this button for each row. Can anyone kindly tell me if it is possible, and maybe tell me how to do it. Thank You, Tarun -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Re: datagridcolumn input filter
--- In flexcoders@yahoogroups.com, Scott - FastLane [EMAIL PROTECTED] wrote: I have not used this component http://weblogs.macromedia.com/pent/archives/2006/08/flex_2_componen.cfm but it looks like you could use it as your item editor. If you don't want to mask input, but just want to validate that it is all numeric during the edit or at the end you could use a validator http://blog.fastlanesw.com/?p=19 during the itemEditEnd processing as I describe on my blog. hth Scott Thanks for the heads-up Scott.
[flexcoders] Button inside a DataGridColumn..is it Possible?
Hi I was trying to find ways to put a button inside a dataGridColumn, so that I can this button for each row. Can anyone kindly tell me if it is possible, and maybe tell me how to do it. Thank You, Tarun
[flexcoders] Re: VerifyError: Error #1025: An invalid register 5 was accessed.
I don't think the itemRenderers are affecting my ability to sort, but I think my lack of dataFields are. My dataobjects look like this: An Application object with a code. A Role object with an Application, code, and description A UserRole object with a Role, and comment. My datagrid contains an ArrayCollection of UserRole mappings. I want a column for the Role code, Role description and Application code. Since I can't set the dataFeld to role.application.code and the like, I've gone to custom renderers. thanks for your help, Steve --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I suspect there might be an easier way, but I'm not sure I fully understand what you are trying to accomplish. Let's start with the data objects: what do they look like? Then, what does the DG look like? Then we can talk about sorting. itemRenderers shouldn't affect your ability to sort.
Re: [flexcoders] Re: Croping area
On Oct 26, 2007, at 12:20 PM, Kevin wrote: this may be a silly question, but how exactly do you draw something in reverse order. I understand the concept, but I am not sure how to do it. Can you do it with the Graphics class or do you need to dig deeper? Mmmm.. I guess I didn't describe my code... did you look at it? This is clockwise drawing of a rectangle: CLOCKWISE : Top Left - Top Right - Bottom Right - Bottom Left - Top Left target.moveTo(x, y); target.lineTo(x+width, y); target.lineTo(x+width, y+height); target.lineTo(x, y+height); target.lineTo(x, y); This is counter-clockwise drawing of a rectangle (reverse order): COUNTER-CLOCKWISE: Top Left - Bottom Left - Bottom Right - Top Right - Top Left target.moveTo(x,y); target.lineTo(x, y+height); target.lineTo(x+width,y+height) target.lineTo(x+width,y); target.lineTo(x,y); You draw multiple closed shapes on one target (sprite, movieclip, whatever) BEFORE you end the fill. It's a single graphics drawing session on a single object. The direction that you draw the points will determine whether or not they subtract or combine. You don't create multiple 'sprites' or objects. Below is the code from your post after this one modified (but untested). override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); // Draw a rectangular mask to darken the cropped out parts of the image var myMask:Sprite = new Sprite(); myMask.graphics.beginFill(0x00); myMask.graphics.drawRect(0,0,unscaledWidth,unscaledHeight); var x:Number = (unscaledWidth - frameWidth)/2; var y:Number = (unscaledHeight - frameHeight)/2; myMask.moveTo(x,y); myMask.lineTo(x, y+frameHeight); myMask.lineTo(x+frameWidth, y+frameHeight); myMask.lineTo(x+frameWidth, y); myMask.lineTo(x,y); myMask.graphics.endFill(); myMask.alpha = .75; this.addChild(myMask); } With a proper drawRect routine that would let you draw a rectangle in reverse (counter-clockwise), you might end up with the following. override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); // Draw a rectangular mask to darken the cropped out parts of the image var myMask:Sprite = new Sprite(); myMask.graphics.beginFill(0x00); // Give me a fill myMask.graphics.drawRect(0,0,unscaledWidth,unscaledHeight); // Now cut a hole out of that fill myMask.graphics.drawRectReverse(0,0,unscaledWidth,unscaledHeight); myMask.graphics.endFill(); myMask.alpha = .75; this.addChild(myMask); } In my applications I have a Graphics class that has a method called drawFrame. It takes the outer and inner rectangle and draws a cutout frame. That should be easy to write drawFrame( outer:Rectangle, inner:Rectangle); good luck, jon
Re: [flexcoders] Re: Croping area
Here is what I did to build a similar crop area component. I don't know if it's the cleanest, but it works. I extended a UIComponent, added frameWidth frameHeight properties and overrode the UpdateDisplayList with the following: override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); //must set blend mode to layer for BlendMode.ERASE to work this.blendMode = BlendMode.LAYER; // Draw a rectangular mask to darken the cropped out parts of the image var myMask:Sprite = new Sprite(); myMask.graphics.beginFill(0x00); myMask.graphics.drawRect(0,0,unscaledWidth,unscaledHeight); myMask.graphics.endFill(); myMask.alpha = .75; this.addChild(myMask); //draw a box to represent the cropped area var myCrop:Sprite = new Sprite(); myCrop.graphics.beginFill(0xFF); myCrop.graphics.drawRect(0,0,frameWidth,frameHeight); myCrop.graphics.endFill(); this.addChild(myCrop); myCrop.blendMode = BlendMode.ERASE; //center the cropped area box myCrop.x = (unscaledWidth - frameWidth)/2; myCrop.y = (unscaledHeight - frameHeight)/2; } On Oct 26, 2007, at 12:20 PM, Kevin wrote: this may be a silly question, but how exactly do you draw something in reverse order. I understand the concept, but I am not sure how to do it. Can you do it with the Graphics class or do you need to dig deeper? Thanks, - Kevin On Oct 25, 2007, at 12:13 AM, Jon Bradley wrote: On Oct 24, 2007, at 9:08 PM, shaun wrote: Could you explain this idea of reverse order a bit more or provide a url with some information about how to do this. I dont think I really understand how to implement it. Reverse Order is the opposite ordering of control points, or knots, on a curve or sequence of lines. Technically reverse drawing order is counter-clockwise. All Graphics class functions in AS3 are clockwise. The most obvious usage of drawing in different directions, clockwise or counter- clockwise, is so that you can create holes (cutouts) within fills. . example attached below. - jon In AS2, here's a quickie example. function drawRect(target:MovieClip, x:Number,y:Number, width:Number, height:Number, reverse:Boolean):Void { if (!reverse) { target.moveTo(x, y); target.lineTo(x+width, y); target.lineTo(x+width, y+height); target.lineTo(x, y+height); target.lineTo(x, y); } else { target.moveTo(x,y); target.lineTo(x, y+height); target.lineTo(x+width,y+height) target.lineTo(x+width,y); target.lineTo(x,y); } } var mc:MovieClip = this.createEmptyMovieClip(some_mc, 0); mc.beginFill(0x00); drawRect(mc, 0,0,100,100,false); drawRect(mc, 10, 10, 80, 80, true); drawRect(mc, 45,45,100,10,false); mc.endFill();
[flexcoders] TileList ItemRenderer with different sizes possible?
I'm looking for a way to show ItemRenderers of various sizes in a TileList. variableRowHeight will let us set the row height for cells in grids, but there doesn't seem to be a way to have varying sizes of ItemRenderers for a TileList, or is there? Any suggestion are appreciated! Jurgen
[flexcoders] Deep binding with Cairngorm question
I have a VO: [Bindable] public class Product { public var productName : String; // several more attributes here } I place a large number of Products in my Cairngorm Singleton SellModelLocator in var productList : ArrayCollection; The entire SellModelLocator is declared Bindable. In one of my mxml views I have the following: mx:Binding source=SellModelLocator.getInstance().productList destination=refreshFilters / I need this binding to execute refreshFilters whenever I add/remove a Product to productList as well as when I change an attribute in one of the Products contained in productList. How do I do this? The follow will fire the refreshFilters: - SellModelLocator.getInstance().productList = new ArrayCollection(); - SellModelLocator.getInstance().productList = someOtherArrayCollection; The following will NOT fire the refreshFilters: - SellModelLocator.getInstance().productList.addItem( new Product() ); - Product(SellModelLocator.getInstance().productList.getItemAt(0)).status = ACTIVE; Any help on how to do a deep bind would be appreciated. Thanks, Dale
RE: [flexcoders] Re: VerifyError: Error #1025: An invalid register 5 was accessed.
Typically, one uses labelFunction to pull role.application.code and display it, and provides a custom sortCompareFunction that pulls the same and sorts it. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lrdvadersith Sent: Friday, October 26, 2007 9:11 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: VerifyError: Error #1025: An invalid register 5 was accessed. I don't think the itemRenderers are affecting my ability to sort, but I think my lack of dataFields are. My dataobjects look like this: An Application object with a code. A Role object with an Application, code, and description A UserRole object with a Role, and comment. My datagrid contains an ArrayCollection of UserRole mappings. I want a column for the Role code, Role description and Application code. Since I can't set the dataFeld to role.application.code and the like, I've gone to custom renderers. thanks for your help, Steve --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: I suspect there might be an easier way, but I'm not sure I fully understand what you are trying to accomplish. Let's start with the data objects: what do they look like? Then, what does the DG look like? Then we can talk about sorting. itemRenderers shouldn't affect your ability to sort.
[flexcoders] Re: ExternalInterface script time out problem!
thank you for the reply. but seems the scriptTimeLimit tag doesn't work. even I set it to 600 seconds. the exception still throwed at15/30 seconds mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; scriptTimeLimit=600 ... any one give a try? Regards!
Re: [flexcoders] Re: Croping area
this may be a silly question, but how exactly do you draw something in reverse order. I understand the concept, but I am not sure how to do it. Can you do it with the Graphics class or do you need to dig deeper? Thanks, - Kevin On Oct 25, 2007, at 12:13 AM, Jon Bradley wrote: On Oct 24, 2007, at 9:08 PM, shaun wrote: Could you explain this idea of reverse order a bit more or provide a url with some information about how to do this. I dont think I really understand how to implement it. Reverse Order is the opposite ordering of control points, or knots, on a curve or sequence of lines. Technically reverse drawing order is counter-clockwise. All Graphics class functions in AS3 are clockwise. The most obvious usage of drawing in different directions, clockwise or counter- clockwise, is so that you can create holes (cutouts) within fills. . example attached below. - jon In AS2, here's a quickie example. function drawRect(target:MovieClip, x:Number,y:Number, width:Number, height:Number, reverse:Boolean):Void { if (!reverse) { target.moveTo(x, y); target.lineTo(x+width, y); target.lineTo(x+width, y+height); target.lineTo(x, y+height); target.lineTo(x, y); } else { target.moveTo(x,y); target.lineTo(x, y+height); target.lineTo(x+width,y+height) target.lineTo(x+width,y); target.lineTo(x,y); } } var mc:MovieClip = this.createEmptyMovieClip(some_mc, 0); mc.beginFill(0x00); drawRect(mc, 0,0,100,100,false); drawRect(mc, 10, 10, 80, 80, true); drawRect(mc, 45,45,100,10,false); mc.endFill();
[flexcoders] Re: Deep binding with Cairngorm question
Never used the Binding tag so I can't say for certain why adding an item isn't firing your binding. I would think it should but I don't know what kind of listener is being set up by Binding. As far as updating an attribute on a Product, you'll want to call prodList.itemUpdated(myProduct) afterwards but again I can't guarantee it will work with Binding. If you set up a listener in AS for CollectionEvent.COLLECTION_CHANGE then that approach should definitely work and adding an item to the collection will fire the binding as well. HTH, Ben --- In flexcoders@yahoogroups.com, dbronk [EMAIL PROTECTED] wrote: I have a VO: [Bindable] public class Product { public var productName : String; // several more attributes here } I place a large number of Products in my Cairngorm Singleton SellModelLocator in var productList : ArrayCollection; The entire SellModelLocator is declared Bindable. In one of my mxml views I have the following: mx:Binding source=SellModelLocator.getInstance().productList destination=refreshFilters / I need this binding to execute refreshFilters whenever I add/remove a Product to productList as well as when I change an attribute in one of the Products contained in productList. How do I do this? The follow will fire the refreshFilters: - SellModelLocator.getInstance().productList = new ArrayCollection(); - SellModelLocator.getInstance().productList = someOtherArrayCollection; The following will NOT fire the refreshFilters: - SellModelLocator.getInstance().productList.addItem( new Product() ); - Product(SellModelLocator.getInstance().productList.getItemAt(0)).status = ACTIVE; Any help on how to do a deep bind would be appreciated. Thanks, Dale
Re: [flexcoders] FW: FileReference.upload()
I've received confirmation from Dave Wolf at Cynergy that this is a long-standing problem. I notice that Adobe Share uploads work in Firefox. It would appear that they might be using AMF. Any idea how that might work? I don't believe there's a way to get to file bytes from a FileReference (presumably a security concern). At this point I'm looking for workarounds that don't involve too much in the way of UI compromise. On 10/25/07, Richard Rodseth [EMAIL PROTECTED] wrote: What, no votes yet? :) Here's the link: http://bugs.adobe.com/jira/browse/SDK-13196 On 10/25/07, Richard Rodseth [EMAIL PROTECTED] wrote: Not sure what the fixed bug is that Matt refers to, but I just logged SDK-13196 Please cast your votes and/or add your experience reports. - Richard On 7/23/07, Matt Chotin [EMAIL PROTECTED] wrote: How is your crossdomain file set up? I see one bug for HTTPS upload that was not reproducible and another that we fixed recently when a default crossdomain file didn't seem to work (fix should be available in a nightly build of the SDK). Matt
[flexcoders] Re: Looking for horizontal sliding list/dialog component (like iPhone UI)
Is this what you mean?? http://www.quietlyscheming.com/blog/components/tutorial-displayshelf- component/
[flexcoders] Datagrid and list related issue
Hi, I would like assistance with ideas on how to trigger a selection on datagrid based on a selection on a list. The items on the list have been generated by dragging a row from the datagrid. so without the user dropping items in the list the list is empty. I would be most grateful of your ideas. Thanks.
[flexcoders] datagrid cellEditor?
During my 'net research to find a solution for restricting user input for a datagridcolumn I came across some flex code which had the statement: dataGrid.cellEditor.restrict='0-9' but I can't find a reference to cellEditor property in Flex 2.01 help. If this from a previous Flex version, and if so what has it become now please?
Re: [flexcoders] Flex 3 Changes to Title Window (and maybe Panel?)
It's problem of Panel, so even Alert windows will be affected. I think it should be a known bug. When you use a default borderStyle, it will be fine. But if you choose none or solid, your Panels are in a mess. George fnfethan wrote: Greetings - Just imported my Flex 2 project into Flex 3. Basically okay but, in most TitleWindows, content that had been positioned below the title bar is now partiall under it, as though the height of the title bar did not figure in the measurement of where to place the children of the Title Window. Any ideas? cheers, ethan
Re: [flexcoders] FLV Recorded stream contains strange additional blank space / frames
Hi Tracy, can you put your analysis (and the flv file) in a new ticket on http://jira.red5.org so we can take a look at it? Also use the Red5 mailinglist [1] for questions because this isn't a Flex question.. Thijs [1] http://osflash.org/mailman/listinfo/red5_osflash.org On Fri, October 26, 2007 4:17 pm, polestar11 wrote: Hi there We're recorded a series of flv files using getCamera() Red5. Some of our recorded flv's have a chunk of dead video space at the begining. Using RichFLV to analyze the timeline, one can see a few key frames, then a huge chunk of blank space spanning for about 1 minute, then continuing key-frames that follow on from the initial keyframes. This throws out our cue-point calculations because it offsets the video playback time. Help! Tracy
Re: [flexcoders] Flex acting weird
I can't believe there are no ideas on this probelm... Anyone? I rebuilt the application removing all subversion stuff so itis clean. only other thing I can think of is I implemented the use of variable settings for the server and port due to our VERY messed up system architecture and the build /test people have no idea except to push a button to release code into testing and production. I used the example: http://yakovfain.javadevelopersjournal.com/passing_parameters_to_flex_that_works.htm Greg - Original Message From: Mr Greg Murnock [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, October 24, 2007 4:02:36 PM Subject: [flexcoders] Flex acting weird Standalone Flex Builder2 fronting ColdFusion. current line count is a whopping 781 lines. I try to add ANY click event even to a button and I get: ReferenceError: Error #1065: Variable is not defined. at global/flash. utils::getDefini tionByName( ) Notice there is not a name of the Variable. all I'm trying to do is add: click=currentState ='displayFilterP anel' All functions have been set to public. And there are no Class definitions on the application. Any thought would be greatly appreciated. Greg _ _ _ _ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail. yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[flexcoders] Re: AIR DnD onto a Tree, how to use calculateDropIndex ?
Does anyone have any experience with finding out over which node in a list/tree a NativeDragEvent occurs? I have been using calculateDropIndex() but this only works on DragEvents. I've been testing with passing null to calculateDropIndex() and checking the dropTarget property with no luck. Any clues as to the proper way to do this are greatly apprecited. Thanks, Ivo --- In flexcoders@yahoogroups.com, Ivo [EMAIL PROTECTED] wrote: I want to evaluate over which node of a Tree a NativeDragEvent occurred. The fn calculateDropIndex() tho only accepts DragEvents. How do I go about getting this information? Thanks, - Ivo
[flexcoders] Re: Deep binding with Cairngorm question
Thank you very much and this did help. Thought I'd reply what I found to work in case you were interested. First, I guess because my Product class is declared as Bindable, I didn't have to call prodList.itemUpdated(myProduct) which was nice since other objects that update myProduct shouldn't have to know where it is stored. Second, swapping my mx:Binding with adding a listener on CollectionEvent.COLLECTION_CHANGE definitely did the trick, but with one bad consequence. If somewhere along the way code was written prodList = new ArrayCollection, it broke. My solution to that was to add back the mx:Binding, but when that fires, it simply runs a function that reestablishes the event listener on CollectionEvent.COLLECTION_CHANGE. Now it seems to work no matter how I set the list. Hope that made sense and thanks again. Dale --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Never used the Binding tag so I can't say for certain why adding an item isn't firing your binding. I would think it should but I don't know what kind of listener is being set up by Binding. As far as updating an attribute on a Product, you'll want to call prodList.itemUpdated(myProduct) afterwards but again I can't guarantee it will work with Binding. If you set up a listener in AS for CollectionEvent.COLLECTION_CHANGE then that approach should definitely work and adding an item to the collection will fire the binding as well. HTH, Ben --- In flexcoders@yahoogroups.com, dbronk dbronk@ wrote: I have a VO: [Bindable] public class Product { public var productName : String; // several more attributes here } I place a large number of Products in my Cairngorm Singleton SellModelLocator in var productList : ArrayCollection; The entire SellModelLocator is declared Bindable. In one of my mxml views I have the following: mx:Binding source=SellModelLocator.getInstance().productList destination=refreshFilters / I need this binding to execute refreshFilters whenever I add/remove a Product to productList as well as when I change an attribute in one of the Products contained in productList. How do I do this? The follow will fire the refreshFilters: - SellModelLocator.getInstance().productList = new ArrayCollection(); - SellModelLocator.getInstance().productList = someOtherArrayCollection; The following will NOT fire the refreshFilters: - SellModelLocator.getInstance().productList.addItem( new Product() ); - Product(SellModelLocator.getInstance().productList.getItemAt(0)).status = ACTIVE; Any help on how to do a deep bind would be appreciated. Thanks, Dale
[flexcoders] Re: Datagrid and list related issue
Opps I almost forgot to mention that data on the grid being filtered. private function gridSelect(event:Event):void{ radAll.selected=true; // change category to all filterGridData(); // reload all the data on a grid ... } mx:List id=liTarget dataProvider={top} dragEnabled=true itemClick=gridSelect(event)/ --- In flexcoders@yahoogroups.com, g07m5064 [EMAIL PROTECTED] wrote: Hi, I would like assistance with ideas on how to trigger a selection on datagrid based on a selection on a list. The items on the list have been generated by dragging a row from the datagrid. so without the user dropping items in the list the list is empty. I would be most grateful of your ideas. Thanks.
RE: [flexcoders] Datagrid and list related issue
On change of the list, get the key value from selectedItem. Then loop over the DataGrid dataProvider until you find a match for the key value. Then use the loop index to set the dataGrid selectedIndex. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of g07m5064 Sent: Friday, October 26, 2007 2:18 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid and list related issue Hi, I would like assistance with ideas on how to trigger a selection on datagrid based on a selection on a list. The items on the list have been generated by dragging a row from the datagrid. so without the user dropping items in the list the list is empty. I would be most grateful of your ideas. Thanks.
[flexcoders] Getting upload progress without FileReference.upload
I'm writing an application that involves a user posting significant amounts of text. I'd like to be able to monitor the status of the upload but from various posts around I've discovered that the ProgressEvent is only dispatched during the download when you use URLLoader. Can anyone suggest a way to make this happen? I've been thinking of extending the socket class for this reason but I'd be working in unfamiliar ground if that's the case. Here's a sample mxml that demonstrates the simplified idea. mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize=fillText() mx:Script !--[CDATA[ import flash.utils.setTimeout; import flash.net.*; private var myLoader:URLLoader public function fillText():void { } private function handleSubmit():void {var data:ByteArray = new ByteArray();while (data.length 100){ data.writeUTF(012345678901234567890123456789012345678901234567890123456\ 789012345678901234567890123456789012345678901234567890123456789012345678\ 901234567890123456789012345678901234567890123456789012345678901234567890\ 123456789012345678901234567890123456789012345678901234567890123456789012\ 3456789\n);}progress.text += About to upload + data.length + B\n;var req:URLRequest = new URLRequest(http://192.168.6.204:8081/portal/upload.rvt;);req.data = data;req.method = URLRequestMethod.POSTmyLoader = new URLLoader();myLoader.addEventListener(ProgressEvent.PROGRESS, handleProgress);myLoader.addEventListener(Event.COMPLETE, handleComplete);myLoader.load(req);setTimeout(checkLoader,500); } private function handleProgress(e:ProgressEvent):void { progress.text += e.bytesLoaded + / + e.bytesTotal + loaded\n; } private function handleComplete(e:Event):void {progress.text += Complete.\n; } private function checkLoader():void { progress.text += myLoader.bytesLoaded + sent\n; setTimeout(checkLoader,500); } ]]-- /mx:Script mx:Panel layout=vertical title=Upload Progress horizontalcenter=0 verticalcenter=0 mx:Button id=submit label=Submit click=handleSubmit() mx:TextArea id=progress width=400 height=300 /mx:TextArea /mx:Button /mx:Panel/mx:Application Thanks in advance for any advice. CM
RE: [flexcoders] datagrid cellEditor?
itemEditorInstance From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of candysmate Sent: Friday, October 26, 2007 11:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] datagrid cellEditor? During my 'net research to find a solution for restricting user input for a datagridcolumn I came across some flex code which had the statement: dataGrid.cellEditor.restrict='0-9' but I can't find a reference to cellEditor property in Flex 2.01 help. If this from a previous Flex version, and if so what has it become now please?
[flexcoders] iterating across an object
In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon
RE: [flexcoders] TileList ItemRenderer with different sizes possible?
Nope, all Tiles must be the same size. If you don't need selection, use mx.containers.Grid (which probably won't be deprecated in 3.0) or mx.containers.Tile From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jurgen Beck Sent: Friday, October 26, 2007 9:46 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] TileList ItemRenderer with different sizes possible? I'm looking for a way to show ItemRenderers of various sizes in a TileList. variableRowHeight will let us set the row height for cells in grids, but there doesn't seem to be a way to have varying sizes of ItemRenderers for a TileList, or is there? Any suggestion are appreciated! Jurgen
RE: [flexcoders] Re: ExternalInterface script time out problem!
Since FP 8 there is a maximum of 60 seconds to the scriptTimeLimit value. I have an app frozen at FP7 because of this. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of icykorpio Sent: Friday, October 26, 2007 12:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ExternalInterface script time out problem! thank you for the reply. but seems the scriptTimeLimit tag doesn't work. even I set it to 600 seconds. the exception still throwed at15/30 seconds mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml scriptTimeLimit=600 ... any one give a try? Regards!
[flexcoders] Re: iterating across an object
You can try (this works well with XML items, should work here I would imagine). for each(var mapItem:Object in map) { ... } --- In flexcoders@yahoogroups.com, simonjpalmer [EMAIL PROTECTED] wrote: In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon
Re: [flexcoders] HTTP Cookie via ActionScript
It works fine for me in Flex 3 without any changes ( was Flex 2). George Sandeep Malik wrote: Guys, We're using flex 3 beta 2 for some project and we're seeing this message: Error #2096: The HTTP request header Cookie cannot be set via ActionScript. ArgumentError: Error #2096: The HTTP request header Cookie cannot be set via ActionScript. at flash.net::URLStream/load() at flash.net::URLLoader/load() Is it true that Flex 3 will not allow to set HTTP Cookies via actionscript? This used to work with Flex 2. This will be really bad for backward compatibility as we have a framework written which sets HTTP Cookies. Can Adobe really be doing this? -Sandeep
RE: [flexcoders] Re: ExternalInterface script time out problem!
Could you call a JS function that calls the other function in a JS setTimeout and calls you back when it is done? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Friday, October 26, 2007 12:01 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: ExternalInterface script time out problem! Since FP 8 there is a maximum of 60 seconds to the scriptTimeLimit value. I have an app frozen at FP7 because of this. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of icykorpio Sent: Friday, October 26, 2007 12:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ExternalInterface script time out problem! thank you for the reply. but seems the scriptTimeLimit tag doesn't work. even I set it to 600 seconds. the exception still throwed at15/30 seconds mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml scriptTimeLimit=600 ... any one give a try? Regards!
[flexcoders] Re: datagrid cellEditor?
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: itemEditorInstance Thanks Alex. If you wanted to resrict user input in a datagridcolumn without using an itemrenderer what approach would you use please?
Re: [flexcoders] Re: Looking for horizontal sliding list/dialog component (like iPhone UI)
Awesome effect - thankx! On 10/26/07, sleekdigital [EMAIL PROTECTED] wrote: Is this what you mean?? http://www.quietlyscheming.com/blog/components/tutorial-displayshelf- component/
RE: [flexcoders] Re: datagrid cellEditor?
You have to either customize the editor, or let them type anything then handle itemEditEnd and reject it if it isn't valid. These days, you should be able to customize like this: mx:DataGridColumn mx:itemEditor mx:Component mx:TextInput restrict=0-9 / From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of candysmate Sent: Friday, October 26, 2007 12:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: datagrid cellEditor? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: itemEditorInstance Thanks Alex. If you wanted to resrict user input in a datagridcolumn without using an itemrenderer what approach would you use please?
Re: [flexcoders] Datagrid and list related issue
Works like a charm. Thanks Tracy. - Original Message From: Tracy Spratt [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, 26 October, 2007 8:55:55 PM Subject: RE: [flexcoders] Datagrid and list related issue On change of the list, get the key value from selectedItem. Then loop over the DataGrid dataProvider until you find a match for the key value. Then use the loop index to set the dataGrid selectedIndex. Tracy From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of g07m5064 Sent: Friday, October 26, 2007 2:18 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] Datagrid and list related issue Hi, I would like assistance with ideas on how to trigger a selection on datagrid based on a selection on a list. The items on the list have been generated by dragging a row from the datagrid. so without the user dropping items in the list the list is empty. I would be most grateful of your ideas. Thanks. !-- #ygrp-mkp{ border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;} #ygrp-mkp hr{ border:1px solid #d8d8d8;} #ygrp-mkp #hd{ color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;} #ygrp-mkp #ads{ margin-bottom:10px;} #ygrp-mkp .ad{ padding:0 0;} #ygrp-mkp .ad a{ color:#ff;text-decoration:none;} -- !-- #ygrp-sponsor #ygrp-lc{ font-family:Arial;} #ygrp-sponsor #ygrp-lc #hd{ margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;} #ygrp-sponsor #ygrp-lc .ad{ margin-bottom:10px;padding:0 0;} -- !-- #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0;} #ygrp-tpmsgs{ font-family:Arial; clear:both;} #ygrp-vitnav{ padding-top:10px;font-family:Verdana;font-size:77%;margin:0;} #ygrp-vitnav a{ padding:0 1px;} #ygrp-actbar{ clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;} #ygrp-actbar .left{ float:left;white-space:nowrap;} .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana;font-size:77%;padding:15px 0;} #ygrp-ft{ font-family:verdana;font-size:77%;border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px;} #ygrp-vital{ background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;} #ygrp-vital #vithd{ font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;} #ygrp-vital ul{ padding:0;margin:2px 0;} #ygrp-vital ul li{ list-style-type:none;clear:both;border:1px solid #e0ecee; } #ygrp-vital ul li .ct{ font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;} #ygrp-vital ul li .cat{ font-weight:bold;} #ygrp-vital a{ text-decoration:none;} #ygrp-vital a:hover{ text-decoration:underline;} #ygrp-sponsor #hd{ color:#999;font-size:77%;} #ygrp-sponsor #ov{ padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;} #ygrp-sponsor #ov ul{ padding:0 0 0 8px;margin:0;} #ygrp-sponsor #ov li{ list-style-type:square;padding:6px 0;font-size:77%;} #ygrp-sponsor #ov li a{ text-decoration:none;font-size:130%;} #ygrp-sponsor #nc{ background-color:#eee;margin-bottom:20px;padding:0 8px;} #ygrp-sponsor .ad{ padding:8px 0;} #ygrp-sponsor .ad #hd1{ font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;} #ygrp-sponsor .ad a{ text-decoration:none;} #ygrp-sponsor .ad a:hover{ text-decoration:underline;} #ygrp-sponsor .ad p{ margin:0;} o{font-size:0;} .MsoNormal{ margin:0 0 0 0;} #ygrp-text tt{ font-size:120%;} blockquote{margin:0 0 0 4px;} .replbq{margin:4;} -- ___ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html
[flexcoders] Re: Deep binding with Cairngorm question
Glad you got it working. Yea, its unfortunate (but unavoidable) that reinitializing a var kills the listeners. (Actually, I think reassigning like that could cause a memory leak, can someone confirm?) If its feasible you may want to replace those lines with prodList.removeAll() and then you should be able to get rid of Binding. Ben --- In flexcoders@yahoogroups.com, dbronk [EMAIL PROTECTED] wrote: Thank you very much and this did help. Thought I'd reply what I found to work in case you were interested. First, I guess because my Product class is declared as Bindable, I didn't have to call prodList.itemUpdated(myProduct) which was nice since other objects that update myProduct shouldn't have to know where it is stored. Second, swapping my mx:Binding with adding a listener on CollectionEvent.COLLECTION_CHANGE definitely did the trick, but with one bad consequence. If somewhere along the way code was written prodList = new ArrayCollection, it broke. My solution to that was to add back the mx:Binding, but when that fires, it simply runs a function that reestablishes the event listener on CollectionEvent.COLLECTION_CHANGE. Now it seems to work no matter how I set the list. Hope that made sense and thanks again. Dale --- In flexcoders@yahoogroups.com, ben.clinkinbeard ben.clinkinbeard@ wrote: Never used the Binding tag so I can't say for certain why adding an item isn't firing your binding. I would think it should but I don't know what kind of listener is being set up by Binding. As far as updating an attribute on a Product, you'll want to call prodList.itemUpdated(myProduct) afterwards but again I can't guarantee it will work with Binding. If you set up a listener in AS for CollectionEvent.COLLECTION_CHANGE then that approach should definitely work and adding an item to the collection will fire the binding as well. HTH, Ben --- In flexcoders@yahoogroups.com, dbronk dbronk@ wrote: I have a VO: [Bindable] public class Product { public var productName : String; // several more attributes here } I place a large number of Products in my Cairngorm Singleton SellModelLocator in var productList : ArrayCollection; The entire SellModelLocator is declared Bindable. In one of my mxml views I have the following: mx:Binding source=SellModelLocator.getInstance().productList destination=refreshFilters / I need this binding to execute refreshFilters whenever I add/remove a Product to productList as well as when I change an attribute in one of the Products contained in productList. How do I do this? The follow will fire the refreshFilters: - SellModelLocator.getInstance().productList = new ArrayCollection(); - SellModelLocator.getInstance().productList = someOtherArrayCollection; The following will NOT fire the refreshFilters: - SellModelLocator.getInstance().productList.addItem( new Product() ); - Product(SellModelLocator.getInstance().productList.getItemAt(0)).status = ACTIVE; Any help on how to do a deep bind would be appreciated. Thanks, Dale
[flexcoders] Re: iterating across an object
for...in and for...each will both work on Object but what you're really looking for is Dictionary. Dictionary supports those loops as well. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer [EMAIL PROTECTED] wrote: In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon
[flexcoders] Using BitmapData.copyPixels with a transformation
I am working on a simple scale crop tool for user uploaded images. In order to perform the crop I use the BitmapData.copyPixels feature with the original image and a rectangle representing the crop area. it all works fine until I want to scale the image as well. Looking at the docs, it appears that copyPixels only works on non- scaled images. Any thought on how I can achieve this? Am I going about this the correct way. It seems some others are working on cropping tools as well. I would love to share some thoughts online or off about the way you are approaching it. Thanks, Kevin
[flexcoders] Detecting a variable change
Hey everybody! I've been trying to figure out how to setup a listener to detect a change in a variable. For instance, lets pretend we have a custom component with the code below. The langType variable is bound to another variable in the main application, and I want it to run the changeLangTxt function whenever the langType variable changes. How do I do this? var langType:String = new String(english); var helloMsg:String; private function changeLangTxt():void{ if(langType == spanish){ helloMsg = Holal } if(langType == english){ helloMsg = Hi Therel } }
Re: [flexcoders] crossdomain.xml... real or not-so-real security?
Isn't it like running a standalone SWF which can access network and local data (provided u have right trust config)? Why to run a internal server and create host entry? SWF in AIR/Standalone can access data from foo.com. Can you put (give an example) this use-case in context of internet (public)? -abdul On 10/26/07, geoffreymina [EMAIL PROTECTED] wrote: Say there is a site which has a crossdomain.xml defined: http://www.foo.com/crossdomain.xml with allow-access-from domain=*.foo.com/ If I were to load an SWF file on my internal webserver and create a local host file which contained an entry for fake.foo.com could I then load the SWF file from fake.foo.com and access data on www.foo.com? If this is the case, then it seems to me that crossdomain.xml is really just something to make people feel warm and fuzzy... and not at all a real security measure. Thanks, Geoff -- -abdul --- http://abdulqabiz.com/blog/ ---
RE: [flexcoders] Detecting a variable change
Normally, you would turn your variable into a get/set function pair. That is what [Bindable] meta data does for you. Var _langType:String Function get langType():String { return _langType} Function set langType(value:String):void { _langType = value; changeLangTxt(); } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of derekyoussi Sent: Friday, October 26, 2007 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Detecting a variable change Hey everybody! I've been trying to figure out how to setup a listener to detect a change in a variable. For instance, lets pretend we have a custom component with the code below. The langType variable is bound to another variable in the main application, and I want it to run the changeLangTxt function whenever the langType variable changes. How do I do this? var langType:String = new String(english); var helloMsg:String; private function changeLangTxt():void{ if(langType == spanish){ helloMsg = Holal } if(langType == english){ helloMsg = Hi Therel } }
Re: [flexcoders] HTTP Cookie via ActionScript
It seems to be Flash Player changes, what player version are you using? -abdul On 10/25/07, Sandeep Malik [EMAIL PROTECTED] wrote: Guys, We're using flex 3 beta 2 for some project and we're seeing this message: Error #2096: The HTTP request header Cookie cannot be set via ActionScript. ArgumentError: Error #2096: The HTTP request header Cookie cannot be set via ActionScript. at flash.net::URLStream/load() at flash.net::URLLoader/load() Is it true that Flex 3 will not allow to set HTTP Cookies via actionscript? This used to work with Flex 2. This will be really bad for backward compatibility as we have a framework written which sets HTTP Cookies. Can Adobe really be doing this? -Sandeep -- -abdul --- http://abdulqabiz.com/blog/ ---
Re: [flexcoders] Detecting a variable change
You can look at Binding (if it's Flex App) or flash.utils.Proxy class... You can watch variable and do whatever you want.. -abdul pretend we have a custom component with the code below. The langType variable is bound to another variable in the main application, and I want it to run the changeLangTxt function whenever the langType variable changes. How do I do this? var langType:String = new String(english); var helloMsg:String; private function changeLangTxt():void{ if(langType == spanish){ helloMsg = Holal } if(langType == english){ helloMsg = Hi Therel } } -- -abdul --- http://abdulqabiz.com/blog/ ---
Re: [flexcoders] Class Socket
Hi, You can read and write data (file content) using Socket. If you are talking about a scenario, where you want user to choose a file using FileReference dialogue box and send the file over socket, that's wouldn't work in Flex apps running in Flash Player. AIR apps can read file content and do whatever they want to... Anyway, once you get the reference of file (assuming it AIR app), you can read the data in ByteArray and send the data over Socket. Sorry no code here... FYI! We are using socket in as3httpclient ( http://code.google.com/p/as3httpclient), which allows HTTP File Upload. Check out the code, it might help. -abdul On 10/25/07, Hugo carvalho [EMAIL PROTECTED] wrote: Hi, someone could give an example of how to send a file (Not text) using socket. Thanks in advance, []! http://livedocs.adobe.com/flex/201/langref/flash/net/Socket.html http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/S... -- -abdul --- http://abdulqabiz.com/blog/ ---
RE: [flexcoders] crossdomain.xml... real or not-so-real security?
That's right. The goal of crossdomain.xml is to limit what an evil person can do in a SWF served over the web so that the unsuspecting Web citizen isn't burned. It does not block access to the contents from someone who has the desire to see the content on their machine. If that same evil person can get to your hosts file, that's the fault of the OS and not Flash. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Qabiz Sent: Friday, October 26, 2007 1:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] crossdomain.xml... real or not-so-real security? Isn't it like running a standalone SWF which can access network and local data (provided u have right trust config)? Why to run a internal server and create host entry? SWF in AIR/Standalone can access data from foo.com. Can you put (give an example) this use-case in context of internet (public)? -abdul On 10/26/07, geoffreymina [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Say there is a site which has a crossdomain.xml defined: http://www.foo.com/crossdomain.xml http://www.foo.com/crossdomain.xml with allow-access-from domain=*.foo.com/ If I were to load an SWF file on my internal webserver and create a local host file which contained an entry for fake.foo.com could I then load the SWF file from fake.foo.com and access data on www.foo.com? If this is the case, then it seems to me that crossdomain.xml is really just something to make people feel warm and fuzzy... and not at all a real security measure. Thanks, Geoff -- -abdul --- http://abdulqabiz.com/blog/ http://abdulqabiz.com/blog/ ---
[flexcoders] Re: AIR DnD onto a Tree, how to use calculateDropIndex ?
So the solution was to extend the Tree and add a function that replicates the part of Tree::updateDropData() that sets the value of rowNum. The rowNum then is the index of the node on which the event occurs. Thanks, Ivo --- In flexcoders@yahoogroups.com, Ivo [EMAIL PROTECTED] wrote: Does anyone have any experience with finding out over which node in a list/tree a NativeDragEvent occurs? I have been using calculateDropIndex() but this only works on DragEvents. I've been testing with passing null to calculateDropIndex() and checking the dropTarget property with no luck. Any clues as to the proper way to do this are greatly apprecited. Thanks, Ivo --- In flexcoders@yahoogroups.com, Ivo cervantes_vive@ wrote: I want to evaluate over which node of a Tree a NativeDragEvent occurred. The fn calculateDropIndex() tho only accepts DragEvents. How do I go about getting this information? Thanks, - Ivo
RE: [flexcoders] FW: FileReference.upload()
At my blogspot, I posted my javascript workaround for uploads in firefox over SSL. Please see http://sethonflex.blogspot.com/ I don't have Adobe Share access, but I would love to see how they accomplish fileupload in firefox over SSL - I don't think they can do it without using filereference.upload unless you click something granting the application special access. (because filereference is the only way into the user files when you're within the sandbox, I believe). In any case, I hope my workaround might help some of you until Adobe fixes their flash player! Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richard Rodseth Sent: Friday, October 26, 2007 10:45 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FW: FileReference.upload() I've received confirmation from Dave Wolf at Cynergy that this is a long-standing problem. I notice that Adobe Share uploads work in Firefox. It would appear that they might be using AMF. Any idea how that might work? I don't believe there's a way to get to file bytes from a FileReference (presumably a security concern). At this point I'm looking for workarounds that don't involve too much in the way of UI compromise. On 10/25/07, Richard Rodseth [EMAIL PROTECTED] mailto:rrodseth%40gmail.com wrote: What, no votes yet? :) Here's the link: http://bugs.adobe.com/jira/browse/SDK-13196 On 10/25/07, Richard Rodseth [EMAIL PROTECTED] mailto:rrodseth%40gmail.com wrote: Not sure what the fixed bug is that Matt refers to, but I just logged SDK-13196 Please cast your votes and/or add your experience reports. - Richard On 7/23/07, Matt Chotin [EMAIL PROTECTED] mailto:mchotin%40adobe.com wrote: How is your crossdomain file set up? I see one bug for HTTPS upload that was not reproducible and another that we fixed recently when a default crossdomain file didn't seem to work (fix should be available in a nightly build of the SDK). Matt
Re: [flexcoders] FW: FileReference.upload()
Thanks Seth. I discovered another issue. If you have a load balancer that needs a cookie for session stickiness, you can't pass it on the URL as you can with the Tomcat session id. And it seems that URLRequestHeader is not supported by FileReference.upload() We're up to five votes. On 10/26/07, Seth Caldwell [EMAIL PROTECTED] wrote: At my blogspot, I posted my javascript workaround for uploads in firefox over SSL. Please see http://sethonflex.blogspot.com/ I don't have Adobe Share access, but I would love to see how they accomplish fileupload in firefox over SSL – I don't think they can do it without using filereference.upload unless you click something granting the application special access. (because filereference is the only way into the user files when you're within the sandbox, I believe). In any case, I hope my workaround might help some of you until Adobe fixes their flash player! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] FDS ManualSync and AS [Managed] Metadata
Yes, when you use manual sync (with auto sync enabled=false) , the client will still both detect changes made on that client and push them to the server and receive pushed changes from the server and apply them on that client. The difference is in how messages are routed from one client to the next. Rather than the server tracking which data each client is actively managing and pushing only the right data to the right clients, you need to set up the routing rules yourself with the publish and subscribe rules. One other difference is that the refresh fill process - i.e. where the server refreshes fill methods after an insert or update or explicit refreshFill call is made on the server does not work with manual sync. Since the server has no knowledge of what fills each client is actively managing and does not cache its current set of ids, it can't refresh it. You can still update queries by using the DataServiceTransaction.addItemToFill and removeItemFromFill methods. Of course the other server side methods updateItem, createItem, and deleteItem also still work though make sure that any use of these apis also supply the producerSubtopics or producerDefaultHeaders needed to route these changes to the right clients. Here's a code snippet of some client code which sets up manual subscriptions: personService.autoSyncEnabled = groupService.autoSyncEnabled = false; // turn off auto sync personService.manualSync.producerDefaultHeaders = {a:4}; // if you use selector expressions this is how you specify key-value pairs for the producer personService.manualSync.producerSubtopics.addItem(grouptopic); // more commonly this publishes to a specific subtopic personService.manualSync.consumerAddSubscription(grouptopic, a IN ('3', '4', '5')); // subscribes both to a subtopic with a selector expression personService.manualSync.consumerSubscribe(); // this actually initiates the subscribe groupService.manualSync.producerDefaultHeaders = {a:4}; groupService.manualSync.producerSubtopics.addItem(grouptopic); groupService.manualSync.consumerAddSubscription(grouptopic, a IN ('3', '4', '5')); groupService.manualSync.consumerSubscribe(); Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of changlim Sent: Thursday, October 25, 2007 9:06 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS ManualSync and AS [Managed] Metadata Hi All, I am dealing with very large data sets and is thinking of using FDS manualSync (instead of auto-sync-enabledtrue/auto-sync- enabled) for pushing server data updates to the clients. To use manualSync, the client code needs to subscribe to the DataServer for changes. From reading the FDS user guide, it was not clear to me if FDS would be able to handle data updates for me (after the client subscribes to the changes). Does having the [Managed] metadata tag in the AS class still work when I am using manualSync? Or does the client now needs to provide callback to handle updates from the manualSync channel? Anyone has example on how to do this? Thanks in advance!
[flexcoders] getCamera not returning built in Firewire cam on OSX 10.4?
Has anyone else had trouble with this and found a solution?
[flexcoders] accordion with more than one item open at the same time
Hi, How do I make an accordion that can display more than one item at the same time. Something similar to the accordion displayed at this page http://www.nytimes.com/packages/khtml/2006/04/02/business/20060402_SECTOR_GRAPHIC.html Thanks, Sashikala
RE: [flexcoders] accordion with more than one item open at the same time
I seem to recall that Peter Ent did a component like this google for it with his name. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sashikala_sn Sent: Friday, October 26, 2007 5:55 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] accordion with more than one item open at the same time Hi, How do I make an accordion that can display more than one item at the same time. Something similar to the accordion displayed at this page http://www.nytimes.com/packages/khtml/2006/04/02/business/20060402_SECTO R_GRAPHIC.html http://www.nytimes.com/packages/khtml/2006/04/02/business/20060402_SECT OR_GRAPHIC.html Thanks, Sashikala
Re: [flexcoders] accordion with more than one item open at the same time
Yup, here it is: http://weblogs.macromedia.com/pent/archives/2007/04/the_stack_compo.cfm
Re: [flexcoders] Button inside a DataGridColumn..is it Possible?
Hello Tarun, It is definitely possible. There are a lot of people with examples. Check out Alex Harui's blog http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html This would give you a start. Regards, Tony tarun chandra wrote: Hi I was trying to find ways to put a button inside a dataGridColumn, so that I can this button for each row. Can anyone kindly tell me if it is possible, and maybe tell me how to do it. Thank You, Tarun
[flexcoders] Re: iterating across an object
thanks, sorry to be dim, but what exactly do I put as the iterator in these loops? for each (what in map) Can I use... var o:Object; for each (o in map)? Incidentally I don't think a Dictionary works in my particular instance because it uses the strict equality === operator which means that I can only retrieve items if I have the exact same object that I used as the key. In my case I am using a String UID value as the key so I can look up objects from the map from lots of different places. I can guarantee that I will *not* have the same instance of the key object when I look up the right hand side of the map, instead I have a String which contains the same characters as the original key. So == will work, but === will not, which unfortunately makes the Dictionary object useless for my purposes. Simon --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: for...in and for...each will both work on Object but what you're really looking for is Dictionary. Dictionary supports those loops as well. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ wrote: In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon
[flexcoders] Swapping color from Bitmap
Hi there, I'm told it is possible to swap a color value from a Bitmap in Flex. Say for example I want to change all the pixels that have the red 0xFF value to any other color value (ex 0xF94A3C), what would it take? Are you aware of any examples/tutorials I can be pointed to? Thanks, Claudia
[flexcoders] transient properties of an object using RemoteClass
I have a situation where I have a deliberate mismatch between my AS3 and Java objects. I have a Java object package com.java class X { private String name; public String getName(){return name;} public void setName(String name){this.name=name;} } and an ActionScript object package com.as3 { [Managed] [RemoteClass(alias=com.java.X)] public class X { private var name:String; private var age:Number; } } this all works great and my X.name gets transported back and forth reliably, however when data is transmitted from client to server I get a warning message from the framework on the server which says... Ignoring set property age for type com.as3.X as a setter could not be found. This means that the age property was transmitted unnecessarily. Not a problem for a primitive like a Number, but a real problem if age contained an array of objects. What I think I need is something like the transient keyword in Java object persistence which causes a property not to be considered for persistence, or in this case transmission. Does any such thing exist, or is there another way of doing this? Thanks
[flexcoders] Re: iterating across an object
Hi Simon, Dictionary will work for you. Strings are passed by value, so it doesn't matter if you have the same key var or not. Run this code to see an example. var d:Dictionary = new Dictionary(); var s1:String = foo; var s2:String = foo; d[s1] = bar; trace(d[s2]); As for what to use as the iterator, that depends on what your collection is holding. If you don't know, or it holds more than one type of object, Object or * would be the type of your iterator. If you know you have a collection of Dog instances, use a Dog iterator. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer [EMAIL PROTECTED] wrote: thanks, sorry to be dim, but what exactly do I put as the iterator in these loops? for each (what in map) Can I use... var o:Object; for each (o in map)? Incidentally I don't think a Dictionary works in my particular instance because it uses the strict equality === operator which means that I can only retrieve items if I have the exact same object that I used as the key. In my case I am using a String UID value as the key so I can look up objects from the map from lots of different places. I can guarantee that I will *not* have the same instance of the key object when I look up the right hand side of the map, instead I have a String which contains the same characters as the original key. So == will work, but === will not, which unfortunately makes the Dictionary object useless for my purposes. Simon --- In flexcoders@yahoogroups.com, ben.clinkinbeard ben.clinkinbeard@ wrote: for...in and for...each will both work on Object but what you're really looking for is Dictionary. Dictionary supports those loops as well. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ wrote: In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon
[flexcoders] Re: transient properties of an object using RemoteClass
http://livedocs.adobe.com/labs/flex/3/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=metadata_066_15.html --- In flexcoders@yahoogroups.com, simonjpalmer [EMAIL PROTECTED] wrote: I have a situation where I have a deliberate mismatch between my AS3 and Java objects. I have a Java object package com.java class X { private String name; public String getName(){return name;} public void setName(String name){this.name=name;} } and an ActionScript object package com.as3 { [Managed] [RemoteClass(alias=com.java.X)] public class X { private var name:String; private var age:Number; } } this all works great and my X.name gets transported back and forth reliably, however when data is transmitted from client to server I get a warning message from the framework on the server which says... Ignoring set property age for type com.as3.X as a setter could not be found. This means that the age property was transmitted unnecessarily. Not a problem for a primitive like a Number, but a real problem if age contained an array of objects. What I think I need is something like the transient keyword in Java object persistence which causes a property not to be considered for persistence, or in this case transmission. Does any such thing exist, or is there another way of doing this? Thanks
[flexcoders] Re: iterating across an object
Why a Dictionary? A Dictionary was designed for Object keys not realy String keys. A plain old fashioned Object will surely do just fine for him, ie exactly as he had it in the first place the only thing he was missing was how to loop over the keys, which would just be: for(key:String in map)map[key] As for his question about HashMaps/HashTables, Object is really the nearest equivialent. Dictionary should be used where you keys are themselves Objects, like a Dictionary with data rows as keys and the value being a component --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Hi Simon, Dictionary will work for you. Strings are passed by value, so it doesn't matter if you have the same key var or not. Run this code to see an example. var d:Dictionary = new Dictionary(); var s1:String = foo; var s2:String = foo; d[s1] = bar; trace(d[s2]); As for what to use as the iterator, that depends on what your collection is holding. If you don't know, or it holds more than one type of object, Object or * would be the type of your iterator. If you know you have a collection of Dog instances, use a Dog iterator. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ wrote: thanks, sorry to be dim, but what exactly do I put as the iterator in these loops? for each (what in map) Can I use... var o:Object; for each (o in map)? Incidentally I don't think a Dictionary works in my particular instance because it uses the strict equality === operator which means that I can only retrieve items if I have the exact same object that I used as the key. In my case I am using a String UID value as the key so I can look up objects from the map from lots of different places. I can guarantee that I will *not* have the same instance of the key object when I look up the right hand side of the map, instead I have a String which contains the same characters as the original key. So == will work, but === will not, which unfortunately makes the Dictionary object useless for my purposes. Simon --- In flexcoders@yahoogroups.com, ben.clinkinbeard ben.clinkinbeard@ wrote: for...in and for...each will both work on Object but what you're really looking for is Dictionary. Dictionary supports those loops as well. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ wrote: In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon
[flexcoders] Re: iterating across an object
Why a Dictionary? Because he was asking about HashMaps. As for his question about HashMaps/HashTables, Object is really the nearest equivialent. I would disagree, considering Dictionary supports Object keys and Object does not. Ben --- In flexcoders@yahoogroups.com, reflexactions [EMAIL PROTECTED] wrote: Why a Dictionary? A Dictionary was designed for Object keys not realy String keys. A plain old fashioned Object will surely do just fine for him, ie exactly as he had it in the first place the only thing he was missing was how to loop over the keys, which would just be: for(key:String in map)map[key] As for his question about HashMaps/HashTables, Object is really the nearest equivialent. Dictionary should be used where you keys are themselves Objects, like a Dictionary with data rows as keys and the value being a component --- In flexcoders@yahoogroups.com, ben.clinkinbeard ben.clinkinbeard@ wrote: Hi Simon, Dictionary will work for you. Strings are passed by value, so it doesn't matter if you have the same key var or not. Run this code to see an example. var d:Dictionary = new Dictionary(); var s1:String = foo; var s2:String = foo; d[s1] = bar; trace(d[s2]); As for what to use as the iterator, that depends on what your collection is holding. If you don't know, or it holds more than one type of object, Object or * would be the type of your iterator. If you know you have a collection of Dog instances, use a Dog iterator. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ wrote: thanks, sorry to be dim, but what exactly do I put as the iterator in these loops? for each (what in map) Can I use... var o:Object; for each (o in map)? Incidentally I don't think a Dictionary works in my particular instance because it uses the strict equality === operator which means that I can only retrieve items if I have the exact same object that I used as the key. In my case I am using a String UID value as the key so I can look up objects from the map from lots of different places. I can guarantee that I will *not* have the same instance of the key object when I look up the right hand side of the map, instead I have a String which contains the same characters as the original key. So == will work, but === will not, which unfortunately makes the Dictionary object useless for my purposes. Simon --- In flexcoders@yahoogroups.com, ben.clinkinbeard ben.clinkinbeard@ wrote: for...in and for...each will both work on Object but what you're really looking for is Dictionary. Dictionary supports those loops as well. HTH, Ben --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ wrote: In the absence of a formal Map I am using an object as a key/value pair map as follows: var map:Object = new Object(); map[A] = some_object_A; map[B] = some_object_B; map[C] = some_object_C; and then looking up by the key var object_A:Object = map[A]; etc. This works really well for random lookup by the key, but what I also need is a way to iterate through the objects I have put on the map object. Is there a for each(* in map) construct I can use? Does anyone know if there are any plans to support HashMaps in AS3 or flash? Is there anything synonymous to a HashMap already that I am clearly not aware of? Thanks Simon