[flexcoders] unsubscribe
unsubscribe
[flexcoders] Forcing titlewindow redraw after includeInLayout set to true
Hello, I have an MXML TitleWindow component that contains the following: popup:MajorImprovementClickableBoard id = board player = {player} majorImprovements = {AgricolaModelLocator.getInstance().game.majorImprovements}/ view:AlternativeCostComponent id = alternativeCostsComponent visible = {board.multipleCosts} includeInLayout = {board.multipleCosts} selectedImprovement = {board.selectedImprovement} player = {player} width=100%/ where at initialization time, board.multipleCosts = false, which means the AlternativeCostComponent is not displayed. When the TileWindow is first created, it is automatically scaled so that the MajorImprovementClickableBoard fits exactly. However, when the board.multipleCosts becomes true, the AlternativeCostComponent becomes visible, but the TileWindow is not refreshed; as a result, a scrollbar appears. What I would like to do is to have the TileWindow be automatically redrawned / rescaled / whatever, so that the content (MajorImprovement + AlternativeCost) fits exactly. I have tried to listen to the includeInLayoutChanged, but this did not achieve anything private function addEventListeners():void { alternativeCostsComponent.addEventListener(includeInLayoutChanged, onLayoutChange); } private function onLayoutChange(event:Event):void { trace(On layout change); // This is printed to the console invalidateDisplayList(); // This does nothing, I still have the scroll bar } I have tried to google it, but without much success. Would you happen to have advises on how I could solve my problem? Thanks a lot, -- Sébastien
[flexcoders] custom flex scroolbar
Hello, I am using IFRAME to display html html pages in my application, i have my coutom scroll bars for my flex application.Is it possible to have coustom scroll bars for my IFRAME. Currently default scroll bars appears in IFRAME. Thanks Prince Now, send attachments up to 25MB with Yahoo! India Mail. Learn how. http://in.overview.mail.yahoo.com/photos
[flexcoders] can't find the filereference.save method
Hi all, I've recently been using Flex Builder 3 for ArcGIS API for Flex. and I am trying to export data both from a variable or datagrid to a text or csv or excel file. I've updated to Flash Player 10 but still method save doesn't show in the list after typing dot after filereference. Here is the sample code- public var downloadFile:FileReference = new FileReference(); public var csvString:String = Owner1, Owner2, Owner3\r\n; private function downloadcsv(csvString:String):void{ var csvData:String = csvString; configureListeners(downloadFile); downloadFile.(save method doesn't showup in the list) //If I use download method the request.url=http://localhost/;; is not //working either. I can save the file but its empty downloadFile.download(request, file2.txt); } Can anyone suggest quick remedies? Need to wrap up my application. Thanks to all!
[flexcoders] Help with Arrays, ArrayCollections Repeaters
I'm trying to get these X's to appear in a circle and not having much lock with it. The array seems to work when I trace it but nothing appears on the screen. I tried just defining an MXML ArrayCollection and it worked but I want them Bindable so I can move them about. Code so far... ?xml version = 1.0? mx:Application xmlns:mx = http://www.adobe.com/2006/mxml; xmlns = * layout = absolute creationComplete = makeChange(); mx:Script ![CDATA[ [Bindable] private var myLabels:Array = new Array(); private function makeChange():void { var i:int, cx:int, cy:int; for (i = 0; i 36; i++) { cx = 200 + 200 * Math.sin(i / 18 * Math.PI); cy = 200 - 200 * Math.cos(i / 18 * Math.PI); myLabels.push({ label: X, x: cx, y: cy }); } } ]] /mx:Script mx:ArrayCollection id = myLabelsAC source = {myLabels}/ mx:Repeater id = myLabelsRep dataProvider = {myLabelsAC} mx:Label id = nameLabel x = {myLabelsRep.currentItem.x} y = {myLabelsRep.currentItem.y} text = {myLabelsRep.currentItem.label} fontSize = 20/ /mx:Repeater /mx:Application Any help appreciated as I am just a learner.
[flexcoders] Re: how may I store values to function's arguments? REFdn7045338143
--- In flexcoders@yahoogroups.com, dennis den...@... wrote: Some times, the one result of a function is not enough, cay we use the arguments to get back values from them? internal function getXY(x:int,y:int):void{ x=10;y=20; } internal function test():void{ var x:int; var y:int; getXY(x,y); trace(x: +x.toString()+ y: +y.toString()); // here I get x: 0 y: 0, I want to get x: 10 y: 20 } For instance, in c the getXY should be like this: internal function getXY(int* x, int* y):void{ x=10;y=20; } Try: private function getXY(x:int, y:int):Object { return {x:10, y:20); } private function test():void { var obj:Object = getXY(0, 0); trace('x: ' + obj.x + ' y: ' + obj.y); ] HTH; Amy
[flexcoders] Re: can't find the filereference.save method
you have to update the sdk used to 3.2 or the latest 3.4 check this out with http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10 --- In flexcoders@yahoogroups.com, mod jhansithepl...@... wrote: Hi all, I've recently been using Flex Builder 3 for ArcGIS API for Flex. and I am trying to export data both from a variable or datagrid to a text or csv or excel file. I've updated to Flash Player 10 but still method save doesn't show in the list after typing dot after filereference. Here is the sample code- public var downloadFile:FileReference = new FileReference(); public var csvString:String = Owner1, Owner2, Owner3\r\n; private function downloadcsv(csvString:String):void{ var csvData:String = csvString; configureListeners(downloadFile); downloadFile.(save method doesn't showup in the list) //If I use download method the request.url=http://localhost/;; is not //working either. I can save the file but its empty downloadFile.download(request, file2.txt); } Can anyone suggest quick remedies? Need to wrap up my application. Thanks to all!
[flexcoders] AIR 1.5.1 Transaction issue: when begin() is called, it doesn't do anything.
Hi all, I have this weird issue that I am having. I am using transaction on this function call functA(). And functA() has been called many times, the transaction worked perfect. BUT...for a reason that I still don't know, the transaction sometimes will not work. And it seems that this phenomenon only happens on the release build because I couldn't reproduce it at all when I am debugging it. How do I find out that the issue was the transaction on release build? I log the before I call transaction begin, and its result and fault handler. I notice that the begin got called but it never got to neither result nor fault handler, which just baffled me. And I did make sure my transaction listener are NOT using weak references. Here's a snip of the code if you are curious: public class AsyncTransactionClass extends EventDispatcher { public function functA():void { sqlStatement = new SQLStatement; sqlStatement.text = some query; sqlStatement.sqlConnection = a sql connection; sqlStatement.sqlConnection.addEventListener(SQLEvent.BEGIN,transactionSetupResultHandler); sqlStatement.sqlConnection.addEventListener(SQLErrorEvent.ERROR,transactionSetupFaultHandler); sqlStatement.sqlConnection.begin(); } private function transactionSetupResultHandler(pEvent:SQLEvent):void { trace(I AM AT RESULT); } private function transactionSetupFaultHandler(pEvent:SQLErrorEvent):void { trace(I AM AT FAULT); } } Does anyone else have this problem? I am really out of ideas now on how to solve this. Thank you.
[flexcoders] Issue in Flex application deployed in Load balanced environment
I have developed the dashboard in my application using flex 3.0. For this I have used JSP wrapper around the flex application. My application runs on JBoss application server. for communication between flex app and my application i am using LCDS. HTTPService component is being used to receive data from the server. Channel definitions are given in service-config.xml for amf and http channels and for both secure secure and not secure mode. In my proxy-config.xml i have defined Channels and destinations. services-config.xml ... ... channel-definition id=my-amf class=mx.messaging.channels.AMFChannel endpoint url=http://{server.name}:{server.port}/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition channel-definition id=my-secure-amf class=mx.messaging.channels.SecureAMFChannel endpoint url=https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure; class=flex.messaging.endpoints.SecureAMFEndpoint/ properties add-no-cache-headersfalse/add-no-cache-headers /properties /channel-definition channel-definition id=my-http class=mx.messaging.channels.HTTPChannel endpoint url=http://{server.name}:{server.port}/{context.root}/messagebroker/http; class=flex.messaging.endpoints.HTTPEndpoint/ /channel-definition channel-definition id=my-secure-http class=mx.messaging.channels.SecureHTTPChannel endpoint url=https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure; class=flex.messaging.endpoints.SecureHTTPEndpoint/ properties add-no-cache-headersfalse/add-no-cache-headers /properties /channel-definition ... ... proxy-config.xml ... ... default-channels channel ref=my-http/ channel ref=my-amf/ channel ref=my-secure-http/ channel ref=my-secure-amf/ /default-channels ... ... destination id=dashboardService properties url/kr/servlet/DashboardServlet/url /properties /destination destination id=dashboardJSPService properties url/kr/krportal/dashboardJSPService.jsf/url /properties /destination ... ... In my development environment both secure and non secure mode were working fine. Now when I have deployed it behind the load balancer(which accepts secure requests only and if the request is not secure it redirects it to secure url) there is no response from the message broker servlet. One thing more I have observed is when the environment is non load balanced there are request like 'http://{server.name}:{server.port}/{context.root}/messagebroker/http'. and these requests are post request. But in load balanced environment with ssl the request is again like 'http://{server.name}:{server.port}/{context.root}/messagebroker/http' which is a post request and it is redirected to 'https://{server.name}:{server.port}/{context.root}/messagebroker/http' which is a get request. The content returned by this get request is null. Looking for some comments Thanks Abhishek Gupta -- View this message in context: http://old.nabble.com/Issue-in-Flex-application-deployed-in-Load-balanced-environment-tp26156027p26156027.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] multiple filter function of combobox and two checkboxes
hi guys, this is the biggest obstacle i have face ever since i started coding in flex. i kindly ask for an example of filtering an array collection using two checkboxes and a combobox. thanks
[flexcoders] NonModal Alert Box
Hi, I have TitleWindow with some fields like combobox.textinput and buttons.On click of Button Alert box opens which is NonModal ,because of Nonmodal i can change values in the TitleWindow even if Alert box is opened,is there any way to don't change values in the Title Window even if alert box is opened with NonModal. Thanks Regards, Yogesh Patel From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew
[flexcoders] event order issues
Good Morning to all, I have a Cairngorm flex app, and I call a function to add something to the db, and then after the insert is complete I pull the updated data, and I run a sort. Here is where my problem is, the sort works fine when it is called after a click event by the user, but when I make the call after the insert the filter is not applied. here is the code wireframe: on the insert button I added an button.addEventListener(FlexEvent.UPDATE_COMPLETE, setlist); // not sure if this is right I have a as3 function that calls the dispatch event to do the insert all is good. the call happens and the sort is run, but I think this is being done before the insert and list re-build is done, so is my eventListener right? Thanks, Darrin
RE: [flexcoders] event order issues
Put trace statements in event handlers so you can see the order. There's probably a collectionEvent after the insert that is better than UPDATE_COMPLETE which gets called often. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Darrin Kay Sent: Sunday, November 01, 2009 11:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] event order issues Good Morning to all, I have a Cairngorm flex app, and I call a function to add something to the db, and then after the insert is complete I pull the updated data, and I run a sort. Here is where my problem is, the sort works fine when it is called after a click event by the user, but when I make the call after the insert the filter is not applied. here is the code wireframe: on the insert button I added an button.addEventListener(FlexEvent.UPDATE_COMPLETE, setlist); // not sure if this is right I have a as3 function that calls the dispatch event to do the insert all is good. the call happens and the sort is run, but I think this is being done before the insert and list re-build is done, so is my eventListener right? Thanks, Darrin