Re: [flexcoders] Re: ArrayCollection to Delimited String
Hi Tim, Thanks for the tip(s). Was able to make this thing work out. Regards, Angelo From: Tim Hoff timh...@aol.com To: flexcoders@yahoogroups.com Sent: Friday, 5 June, 2009 14:05:46 Subject: [flexcoders] Re: ArrayCollection to Delimited String Well, let's not assume anything: privatefunctionparseArrayCollectio n():void { varmyString:String = ; foreach( varmyObject:Object inmyAC ) { myString += myObject.label + |+ myObject.data + ||; } trace(myString); } -TH --- In flexcod...@yahoogro ups.com, Tim Hoff timh...@... wrote: Assuming that you don't want the trailing pipes: private function parseArrayCollectio n():void { var myString:String = ; for each ( var myObject:Object in myAC ) { myString += myObject.label + | + myObject.data; if ( myAC.getItemIndex( myObject ) myAC.length - 1 ) { myString += |; } } trace(myString) ; } -TH --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ wrote: Hi FlexCoders, Supposed I have an ArrayCollection variable represented like below: mx:ArrayCollection id=myAC mx:Array id=myArray mx:Object label=MI data=Lansing / mx:Object label=MO data=Jefferson City/ mx:Object label=MA data=Boston / mx:Object label=MT data=Helena / mx:Object label=ME data=Augusta / mx:Object label=MS data=Jackson / mx:Object label=MN data=Saint Paul/ /mx:Array /mx:ArrayCollection I want to store the same in a String variable where the resulting string would be like: var ResultString: String; ResultString = MI|Lansing| |MO|Jefferson City||MA|Boston| |MT|Helena| |ME|Augusta| |MS|Jackson| |MN|Saint Paul|| How do I achieve this? Inputs highly appreciated. Thanks. Regards, Angelo
[flexcoders] xViewerSample
Hai Please help me with the following I tried to display jasper reports in flex using xViewerSample. xViewerSample is avaliable for download at the following link http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetailextid=1384018 I need to connect to connect to jasper server using xViewerSample. Please provide me information on how to use following tag after adding the following namespaces to the application tag. xmlns:jrv=com.jaspersoft.reports.viewer.* xmlns:remote=com.jaspersoft.reports.data.impl.remote.* How to use these tags remote:JServer/ remote:RemoteReportStore/ remote:ResourceDescriptor/ jrv:Viewer / jrv:JasperServers/ Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com
[flexcoders] Resource Reference
Hi all, I've got a component which includes the following lines: [Embed(source=/localAssets/img/icon128.png)] public static const IMAGE_ICON128:Class; Calling this constant directly from a component I receive the image: mx:Canvas backgroundImage={localAssets.localIMAGES.IMAGE_ICON128}/ But when I use a style definition: mx:Canvas styleName=bgCanvas/ CSS .bgCanvas { background-image:ClassReference(localAssets.localIMAGES.IMAGE_ICON128); } I receive the following compile error: Definition localAssets.localIMAGES.IMAGE_ICON128 could not be found. Has anybody some experience what are the difference between those two reference methods? How I can reference it from the css?
[flexcoders] Wrapping components
Hi, I have a newbie question on layout.I'm looking for a container component that would wrap the components inside, keeping width the same and expanding the height to fit, allowing all components inside to be visible while keeping a maximum width. I tried HBox and VBox but as you can imagine they either cut it out, or just expand in the wrong way. Please help. Thanks, Mike
[flexcoders] Re: DataGrid not releasing memory on removeAll()
Have you tried to force the garbage collection process? flash.System.gc() Art --- In flexcoders@yahoogroups.com, Dharmendra Chauhan chauhan_i...@... wrote: Hi All, My DataGrid based application running into a Memory issue.The issue is dataGrid does not release the memory even after emptying it. Initially I thought Its my code which is causing the issue, but later I crated a sample application with just a dataGrid and a ArraCollection (no eventListener) and found the same issue. Memory should come down at least some MB when I remove all item from data provider. Memory usage with 10k row - 220 MB Memory usage after removing all item - STILL 220 MB Is this the standard behavior of datGird or do i need to apply some workaround to get rid of this ? Regards, Dharmendra
Re: [flexcoders] DataGrid not releasing memory on removeAll()
Be sure you remove all references to your data removed.. For instance : is there eventlistener on them you didnt remove? Or did you set a variable wi line as reference? Regards Joky Pedro Sena sena.pe...@gmail.com Ecrivait: The memory is not necessarily released just after you remove the items from datagrid. Removing them, you make them eligible by the garbage collector, but this does not necessarily means that it will be collected. HTH, PS On Sat, Jun 6, 2009 at 3:02 PM, Dharmendra Chauhan a href=mailto:chauhan_i...@yahoo.com;chauhan_i...@yahoo.com/a wrote: blockquote style=1px: class=gmail_quote Hi All, My DataGrid based application running into a Memory issue.The issue is dataGrid does not release the memory even after emptying it. Initially I thought Its my code which is causing the issue, but later I crated a sample application with just a dataGrid and a ArraCollection (no eventListener) and found the same issue. Memory should come down at least some MB when I remove all item from data provider. Memory usage with 10k row - 220 MB Memory usage after removing all item - STILL 220 MB Is this the standard behavior of datGird or do i need to apply some workaround to get rid of this ? Regards, Dharmendra -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ -- Guillaume Aveline Ingénieur Développement Pikko.fr
[flexcoders] Pdf library
Hello, What is the best Pdf library to use with Flex Builder? Thank you, Christophe,
[flexcoders] Pb with mx:image
Hello, I use an mx:image as a temporary invisible image. I have set visible=false. But on the flex interface there is a space visible corresponding to the masked image. How to set an image as really invisible ? Thank you, Christophe,
[flexcoders] Pb with Slider
Hello, I want my Sliders to increment 1 by 1. How to set the Slider for a 1 integer incrementation when I move the slider ? Thank you, Christophe,
[flexcoders] Button to link
Hello, How to have a button that open another web page ? Thank you, Christophe,
RE: [flexcoders] Pb with mx:image
includeInLayout=false Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of christophe_jacquelin Sent: Sunday, June 07, 2009 9:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Pb with mx:image Hello, I use an mx:image as a temporary invisible image. I have set visible=false. But on the flex interface there is a space visible corresponding to the masked image. How to set an image as really invisible ? Thank you, Christophe,
RE: [flexcoders] Button to link
See LinkButton. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of christophe_jacquelin Sent: Sunday, June 07, 2009 9:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Button to link Hello, How to have a button that open another web page ? Thank you, Christophe,
RE: [flexcoders] Pb with Slider
Search for snap in the docs. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of christophe_jacquelin Sent: Sunday, June 07, 2009 9:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Pb with Slider Hello, I want my Sliders to increment 1 by 1. How to set the Slider for a 1 integer incrementation when I move the slider ? Thank you, Christophe,
Re: [flexcoders] Button to link
Check out the code below. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import flash.net.navigateToURL; private function loadURL():void{ navigateToURL(new URLRequest(http://www.google.com;),_blank); } ]] /mx:Script mx:Button x=453 y=145 label=Button click=loadURL();/ /mx:Application christophe_jacquelin wrote: Hello, How to have a button that open another web page ? Thank you, Christophe, -- View this message in context: http://www.nabble.com/Button-to-link-tp23911003p23912732.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Resource Reference
Hi, In CSS, you usually use ClassReference for a programatic skin. For a Graphical skin use: .bgCanvas { background-image: Embed(source='/localAssets/localIMAGES.IMAGE_ICON128'); } Notice that CSS uses / instead of a dot. Does the image file have an extension (.png, .jpg) ? -TH --- In flexcoders@yahoogroups.com, dang_art dang_...@... wrote: Hi all, I've got a component which includes the following lines: [Embed(source=/localAssets/img/icon128.png)] public static const IMAGE_ICON128:Class; Calling this constant directly from a component I receive the image: mx:Canvas backgroundImage={localAssets.localIMAGES.IMAGE_ICON128}/ But when I use a style definition: mx:Canvas styleName=bgCanvas/ CSS .bgCanvas { background-image:ClassReference(localAssets.localIMAGES.IMAGE_ICON128)\ ; } I receive the following compile error: Definition localAssets.localIMAGES.IMAGE_ICON128 could not be found. Has anybody some experience what are the difference between those two reference methods? How I can reference it from the css?
[flexcoders] Re: Wrapping components
Hi Mke, This might be what you're looking for: http://www.munkiihouse.com/?p=60 http://www.munkiihouse.com/?p=60 -TH --- In flexcoders@yahoogroups.com, Mike Chang mik...@... wrote: Hi, I have a newbie question on layout.I'm looking for a container component that would wrap the components inside, keeping width the same and expanding the height to fit, allowing all components inside to be visible while keeping a maximum width. I tried HBox and VBox but as you can imagine they either cut it out, or just expand in the wrong way. Please help. Thanks, Mike
[flexcoders] Re: Resource Reference
oops, didn't read the top all the way. This should work: .bgCanvas { background-image: Embed(source='/localAssets/img/icon128.png'); } -TH --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: Hi, In CSS, you usually use ClassReference for a programatic skin. For a Graphical skin use: .bgCanvas { background-image: Embed(source='/localAssets/localIMAGES.IMAGE_ICON128'); } Notice that CSS uses / instead of a dot. Does the image file have an extension (.png, .jpg) ? -TH --- In flexcoders@yahoogroups.com, dang_art dang_art@ wrote: Hi all, I've got a component which includes the following lines: [Embed(source=/localAssets/img/icon128.png)] public static const IMAGE_ICON128:Class; Calling this constant directly from a component I receive the image: mx:Canvas backgroundImage={localAssets.localIMAGES.IMAGE_ICON128}/ But when I use a style definition: mx:Canvas styleName=bgCanvas/ CSS .bgCanvas { background-image:ClassReference(localAssets.localIMAGES.IMAGE_ICON128)\ \ ; } I receive the following compile error: Definition localAssets.localIMAGES.IMAGE_ICON128 could not be found. Has anybody some experience what are the difference between those two reference methods? How I can reference it from the css?
[flexcoders] Re: DataGrid not releasing memory on removeAll()
Hi All, Thanks for the response. 1) I agree with the fact - that memory is not necessarily released just after you remove the items from datagrid. Now my question is how long I have to wait for GC to run and If they are eligible for GC then memory should be coming down after I issue Sytem.gc(). Why Memory usage is not coming down even after Force GC ??? 1) I do not have any event listerner attached to dataGrid or ArrayCollection, In fact, In my sample App , I just crated a data Grid with data provider and thats it. I suspect , dataGrid does not release its itemerenderer even after removing all item After digging the DG code I found following . Why FreeItemRenderersTable is Strongly Referenced ?? public function DataGridBase() { super(); listType = vertical; defaultRowCount = 7;// default number of rows is 7 columnMap = {}; freeItemRenderersTable = new Dictionary(false); } Is this the only reason for itemrenderes not being eligible for GC ?? Please throw some light on it Regards, Dharmendra --- In flexcoders@yahoogroups.com, Pedro Sena sena.pe...@... wrote: The memory is not necessarily released just after you remove the items from datagrid. Removing them, you make them eligible by the garbage collector, but this does not necessarily means that it will be collected. HTH, PS On Sat, Jun 6, 2009 at 3:02 PM, Dharmendra Chauhan chauhan_i...@...wrote: Hi All, My DataGrid based application running into a Memory issue.The issue is dataGrid does not release the memory even after emptying it. Initially I thought Its my code which is causing the issue, but later I crated a sample application with just a dataGrid and a ArraCollection (no eventListener) and found the same issue. Memory should come down at least some MB when I remove all item from data provider. Memory usage with 10k row - 220 MB Memory usage after removing all item - STILL 220 MB Is this the standard behavior of datGird or do i need to apply some workaround to get rid of this ? Regards, Dharmendra -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
Re: [flexcoders] Pdf library
I dont think there are many : you can have a look at http://alivepdf.bytearray.org thomas --- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056 2009/6/7 christophe_jacquelin christophe_jacque...@yahoo.fr Hello, What is the best Pdf library to use with Flex Builder? Thank you, Christophe,
[flexcoders] Re: HTTPService.send(params) and nothing happens?
This is still mystifying to me. I set up a local tomcat and simple Spring web page with a form. The controller gets the request to show the form and returns the page with which my service retrieves. If I try to request the action command the page uses o submit the request i get a security error (keep in mind this is all local domain with a crossdomain.xml) I just seems like no matter what I do the HTTPService cn retrieve the form but can't perform a simple submit? Even without? --- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: send(params) will do either a GET or a POST to the URL with the params sent as name=value pairs either as a query string (GET) or in the body of the request (POST). By default it uses GET. The form you post to has to look for the variables in the right place. Are you able to see what URL is actually being requested on the server (ie, do you have access to the server logs)? Looking at what is actually being requested via either Firebug or Fiddler is then your next step. Guy On 01/06/2009, at 5:49 AM, ciminop wrote: I tried that and the page does the same thing, which is why I tried the HTML calling the login script. I thought the problem on the http://www.postgradmed.com/index.php?page=login is that there are multiple forms in the page. But if you paste the url into my application in the URL text input, you'll see the post Grad med page code. Even with a correct ID Password, the page source still shows the login form. However, my point is still valid, or maybe I'm just confused (happens). If I point to my test login page and perform send is this supposed to return the page or try to submit the form? If it's supposed to submit the form, how come all I get back is the blank form/html code? If it supposed to submit, why don't I get back something different? --- In flexcoders@yahoogroups.com, Pedro Sena sena.pedro@ wrote: Your URL should point to http://www.postgradmed.com/index.php?page=login instead of http://www.translunardesigns.com/postgradmed/testlogin.html You need to point to the same page/script that the html does. HTH On Sun, May 31, 2009 at 10:53 AM, ciminop ciminop@ wrote: Not exactly nothing, I get the contents of the URL that I'm trying to send the data to, and have it submit a form. I created a simple login form which logs into a remote site. If you submit it, wven with no data or incorrect data it will take you to the remote site. Here's the form: http://www.translunardesigns.com/postgradmed/testlogin.html Next, I have a Flex app that uses the HTTPService to call my test HTML. Whether I submit this with data, no data, incorrect data, the result is the same: response code 200 (OK), and the results, which i expect to have the html of the remote site, instead contain the html of the testlogin.html. The application is here, source viewable with right-click: http://www.translunardesigns.com/postgradmed/PostGradMed.html So my question(s) is(are): Why is this not redirecting to the remote site and how can I get this to actually get the response form the submitted form? -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
[flexcoders] Flex and .NET
Hi FlexCoders, I have recently discovered the wonders of developing RIAs with Flex / FlexBuilder and have completely decided to use the same in further development efforts on my part. With a little .NET knowledge, I decided to venture out on the path of Flex by combining it with some wisdom I gained from developing using .NET. As I have been working a lot on business and data driven application, I tried to re-create one screen of an application which I have previously done in ASP.Net into Flex. Nothing really fancy, just a simple screen which contains a datagrid listing of some parts references, with basic CRUD capabilities, sort and filter, and generation of report to print out the listing. With tremendous resources coming from this group, I was able to accomplish a little application which does what I first intended to do: 1. Display data in a datagrid control. 2. Provide sort (built-in to the datagrid) and search and filter mechanism to the datagrid. 3. Provide basic CRUD capabilities to the application. 4. Generating a report for the datagrid. Take note that the context of my application is a simple Flex on the front end, connnecting to a .NET webservice on the backend (for data/CRUD facilities/reporting facilities). The SWF application is simply embedded on an HTML page (copying the HTML generated from the FlexBuilder IDE). I was able to utilize the webservice, combined with Crystal Report (which comes built-in in Visual Studio) to create a report of the list which the application displays. The report is processed and a PDF file is generated which I am opening with the Flex application via an ExternalInterface javascript call to open the said PDF file report in another browser window. The way I was able to accomplish this is a bit of a hack. What I did was in my datagrid's provider, which is an ArrayCollection, I created a string, which is delimited by special characters to denote a field/column entry. For Example I have the following data on my ArrayCollection: ID Description 01 Lakers 02 Magic 03 Nuggets 04 Cavaliers 05 Celtics What I did was then parse this data into a delimited string such that my string variable would look like: 01|Lakers||02|Magic||03|Nuggets||04|Cavaliers||05|Celtics|| This string, can be easily parsed in .NET using some simple string functions and be pushed to a Crystal Report document, to generate the desired report. I feel that this is probably not the BEST way of doing this. I tried initially to pass an XML delimmited string, but .NET seems to read XML differently(?) from Flex. I would certainly appreciate any comments and suggestions on the way to achieve this properly. I am a bit lost on the XML data interchange between .NET and Flex. I am looking to use the ArrayCollection but I am still uncertain on what/how I would match it with the .NET data type. Looking forward to your inputs. Thanks and appreciating this group a lot, Angelo
Re: [flexcoders] Flex and .NET
2009/6/8 Angelo Anolin angelo_ano...@yahoo.com: I feel that this is probably not the BEST way of doing this. I tried initially to pass an XML delimmited string, but .NET seems to read XML differently(?) from Flex. I'd say XML would be a good way of doing it. What kind of errors are you getting, and how are you making the web service call? The other option is to use AMF, a native messaging format for Flash/Flex. This I believe would save you the effort of serializing and deserializing - it does it for you, among other things. http://www.themidnightcoders.com/products/weborb-for-net/overview.html
Re: [flexcoders] Flex and .NET
Hi Sam, Thanks for your reply. As of now, I actually prefer to utilize what I know on .NET and what I am learning on Flex. Adding another utility (Web Orb) in my learning process may complicate things a bit. I might consult this later if I feel that the needs for is getting tremendous. Anyway, I am actually able to generate the report from what I am currently doing (no error encountered), where the ArrayCollection I am parsing into a delimited string, passing the string to the webservice call, and letting the webservice de-serialize the string to populate a Crystal report document which I subsequentlt display in another browser window which I call from the Flex application. I mentioned that I did not feel it is the BEST way because I am literally storing all datagrid (report) information in a string variable. Assuming for example that the data displayed in the datagrid is quite huge, then creating the delimited string would take some time and additional processing time could also be consumbed by the back end web service to parse the string and populate the report. As of now, this is what the application does. 1. Flex App calls a webservice to retrieve data. 2. WebService responds by sending back a dataset which is returned as a string (via Dataset.GetXML method of .NET). 3. Flex App gets the service response, converts the string into an XML. 4. Flex App converts the XML data into an ArrayCollection which is bound to the datagrid. * Please note that I used array collection here for the search/filter functionality of the datagrid. 5. When generating print out of the data displayed in the datagrid, Flex would then serialize the ArrayCollection into a delimited string and send it to the web service. 6. Web Service would then de-serialize (or parse) the string, populate a .NET dataset which is the datasource for the Crystal report. 7. Crystal report is bound and PDF report is generated. 8. Flex displays via external javascript call the PDF report generated. Is there a better way for the ArrayCollection to be sent to the webservice, the webservice in turn would just convert it to dataset and the dataset is immediately bound to the Crystal report? Thanks. Regards, Angelo From: Sam Lai samuel@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, 8 June, 2009 8:49:36 Subject: Re: [flexcoders] Flex and .NET 2009/6/8 Angelo Anolin angelo_anolin@ yahoo.com: I feel that this is probably not the BEST way of doing this. I tried initially to pass an XML delimmited string, but .NET seems to read XML differently( ?) from Flex. I'd say XML would be a good way of doing it. What kind of errors are you getting, and how are you making the web service call? The other option is to use AMF, a native messaging format for Flash/Flex. This I believe would save you the effort of serializing and deserializing - it does it for you, among other things. http://www.themidni ghtcoders. com/products/ weborb-for- net/overview. html
Re: [flexcoders] Flex and .NET
Considering the time required for serialization/deserialization, using something like webORB would improve parsing time, as it uses a binary format which can be parsed more easily than a text format. But unless you're using large datasets/doing lots of web service calls, the advantages are probably negligible. Are you transmitting everything in the array collection back to the web service, or just the IDs of the selected rows? Transferring everything including the row data would remove the need for another database hit, but for large datasets, that could be quite a bit of traffic. I'd say it would be better just to transmit the IDs back to the webservice, and let the webservice hit the database for the row data (some caching on the server-side would help too). 2009/6/8 Angelo Anolin angelo_ano...@yahoo.com: Hi Sam, Thanks for your reply. As of now, I actually prefer to utilize what I know on .NET and what I am learning on Flex. Adding another utility (Web Orb) in my learning process may complicate things a bit. I might consult this later if I feel that the needs for is getting tremendous. Anyway, I am actually able to generate the report from what I am currently doing (no error encountered), where the ArrayCollection I am parsing into a delimited string, passing the string to the webservice call, and letting the webservice de-serialize the string to populate a Crystal report document which I subsequentlt display in another browser window which I call from the Flex application. I mentioned that I did not feel it is the BEST way because I am literally storing all datagrid (report) information in a string variable. Assuming for example that the data displayed in the datagrid is quite huge, then creating the delimited string would take some time and additional processing time could also be consumbed by the back end web service to parse the string and populate the report. As of now, this is what the application does. 1. Flex App calls a webservice to retrieve data. 2. WebService responds by sending back a dataset which is returned as a string (via Dataset.GetXML method of .NET). 3. Flex App gets the service response, converts the string into an XML. 4. Flex App converts the XML data into an ArrayCollection which is bound to the datagrid. * Please note that I used array collection here for the search/filter functionality of the datagrid. 5. When generating print out of the data displayed in the datagrid, Flex would then serialize the ArrayCollection into a delimited string and send it to the web service. 6. Web Service would then de-serialize (or parse) the string, populate a .NET dataset which is the datasource for the Crystal report. 7. Crystal report is bound and PDF report is generated. 8. Flex displays via external javascript call the PDF report generated. Is there a better way for the ArrayCollection to be sent to the webservice, the webservice in turn would just convert it to dataset and the dataset is immediately bound to the Crystal report? Thanks. Regards, Angelo From: Sam Lai samuel@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, 8 June, 2009 8:49:36 Subject: Re: [flexcoders] Flex and .NET 2009/6/8 Angelo Anolin angelo_anolin@ yahoo.com: I feel that this is probably not the BEST way of doing this. I tried initially to pass an XML delimmited string, but .NET seems to read XML differently( ?) from Flex. I'd say XML would be a good way of doing it. What kind of errors are you getting, and how are you making the web service call? The other option is to use AMF, a native messaging format for Flash/Flex. This I believe would save you the effort of serializing and deserializing - it does it for you, among other things. http://www.themidni ghtcoders. com/products/ weborb-for- net/overview. html