Re: [flexcoders] event order issues
I put in the trace, and it is going to the sort before the result is back from the db. Any suggestions? On Mon, Nov 2, 2009 at 7:42 AM, Alex Harui aha...@adobe.com wrote: 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
Re: [flexcoders] event order issues
is there a way to dispatch the event from the command file? that would solve the problem Thanks for the help, Darrin On Mon, Nov 2, 2009 at 8:09 AM, Darrin Kay dar...@stop-ing.com wrote: I put in the trace, and it is going to the sort before the result is back from the db. Any suggestions? On Mon, Nov 2, 2009 at 7:42 AM, Alex Harui aha...@adobe.com wrote: 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
[flexcoders] Adobe comment on ASC-3136?
Anyone from Adobe want to comment on the closing of the issue on Proxies? http://bugs.adobe.com/jira/browse/ASC-3136 It got changed to deferred then closed, and no-one updated the comments with why! With 110 votes, it's a relatively hot topic. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk
[flexcoders] Problem with using LocalConnection.domain on domain with special characters
I'm using LocalConnection.domain to get the current domain - however I ran into a problem when the domain name has special characters (in my case moteklær.no http://xn--moteklr-rxa.no).. In IE it will return moteklær.no http://xn--moteklr-rxa.no In Firefox it will return moteklÁ|r.no In Chrome it will return xn--moteklr--j9a.no What I need is what IE returns .. bjornbjorn -- http://twitter.com/bjornbjorn
RE: [flexcoders] Make Flex AIR app demand more system resources
Are you really suggesting that the AIR app isn't a massive resource hog and is unusable for any purpose? This should be a good thread to watch *fetches popcorn* Seriously though, and on topic... When you say it relinquishes resources back to readily, are you talking about CPU time, and therefore getting a jittery frame rate? Could be either the runtime or the OS scheduler I suppose. If the runtime doesn't place a high enough priority on running animations (i.e. AS is given a higher priority) it could release back to easily. Likewise the OS scheduler could be thinking the app is idle when it isn't. Stupid suggestion, but running some AS code alongside the animations... Running something small and inconsequential in an enterframe handler. Does it change the game somewhat? Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk
[flexcoders] Casting down an object
Hi all, I'm wondering if it is possible to 'hack' some sort of downcasting into AS3. The context is, that I am using a generated webservice proxy from Flex 3, and want to be able to add custom (extra) properties to the generated valueobjects without having to adjust the code that parses the wsdl result into objects. So e.g. the webservice generates the class: class A { property A; property B; } I have my own class that is: class B extends A { property C; } When i call the generated webservice get all A's, it will return an array of A objects, what I am looking for is to convert that list into B objects. So the values of the properties that exist in the A counterpart, filled for a new B instance, with an empty C property. Any ideas? Cheers, Ben
[flexcoders] RemoteObject question/mystery
Looking for a little education from all the people smarter than me of remoteObjects. I have always used the MXML version which includes the resultHandler attribute which made managing the returned data easy. However I never learned the AS version very well. I can create the remoteObject in AS and call its method, add the EventListener, but how do I actually get the data back to a caller function? index.mxml import org.mywindow.data.Users; [Bindable] public var users:ArrayCollection; public function getMyData():void { users = Users.getAll(); } for the User's getAll function I have something like: UserDAO.as ... public var _users:ArrayCollection; public function getAll():void { var UserDAO:RemoteObject = new RemoteObject(); UserDAO.destination = ColdFusion; UserDAO.source = org.mywindow.data.userDAO; UserDAO.getAll.addEventListener(ResultEvent.RESULT, resultHandler); UserDAO.getAll.addEventListener(FaultEvent.FAULT, faultHandler); } public function resultHandler(e:ResultEvent):ArrayCollection{ _users = e as ArrayCollection; return users; } I know some of the code may be off, but I am trying to understand how a non called function (resultHandler) can return data to the called function in a different class. So my question is, if the index.mxml calls the getAll function in the UserDAO class, will the getMyData function still receive the ArrayCollection from the resultHandler? If I were to fire this off, till the result be that my users ArrayCollection in the index.mxml be populated in the end? Thanks!
[flexcoders] SWFLoader problem
In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas. How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.
RE: [flexcoders] Re: UDP via Flex socket
UDP support is being added in AIR 2.0. I don't know if that list extends to the Flash Player as well... http://blogs.adobe.com/cantrell/archives/2009/10/everything_new_in_air_2 .html Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Sent: 30 October 2009 15:55 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: UDP via Flex socket The sample code in the Adobe Docs sends a GET which I think makes it HTTP. As far as I can tell the binary socket doesn't support UDP. Somewhere in the internals it must be presuming TCP or HTTP - or maybe RTMP. Anyway, it looks like my suspicions were right. I'll ask another question about what protocol Flex developers are using to communicate between clients for multi-player games.
[flexcoders] Re: NonModal Alert Box
When you put up the Alert, run some code to disable the items in the TitleWindow. Then in the Alerts closeHandler have some code to enable those same items. --- In flexcoders@yahoogroups.com, yogesh patel mailtoyogeshpa...@... wrote: 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
Re: [flexcoders] Adobe comment on ASC-3136?
It's deferred for a future Player from what I can tell. We know it's important to folks though. Sent from my phone. Please excuse brevity or typos. On Nov 2, 2009, at 1:56 AM, Gregor Kiddie gkid...@inpses.co.ukmailto:gkid...@inpses.co.uk wrote: Anyone from Adobe want to comment on the closing of the issue on Proxies? http://bugs.adobe.com/jira/browse/ASC-3136http://bugs.adobe.com/http://adobe.com/jira/browse/ASC-3136 It got changed to deferred then closed, and no-one updated the comments with why! With 110 votes, it’s a relatively hot topic. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.ukhttp://inps.co.uk
RE: [flexcoders] Adobe comment on ASC-3136?
Cheers Matt, Is it possible to have an Adobe employee comment on the issue with something along those lines? Just for those folks who don't frequent this list but who are watching the issue. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Matt Chotin Sent: 02 November 2009 14:49 To: flexcoders@yahoogroups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Adobe comment on ASC-3136? It's deferred for a future Player from what I can tell. We know it's important to folks though. Sent from my phone. Please excuse brevity or typos.
Re: [flexcoders] Adobe comment on ASC-3136?
Well, it's what Closed/Deferred means but I'll see. Sent from my phone. Please excuse brevity or typos. On Nov 2, 2009, at 7:02 AM, Gregor Kiddie gkid...@inpses.co.ukmailto:gkid...@inpses.co.uk wrote: Cheers Matt, Is it possible to have an Adobe employee comment on the issue with something along those lines? Just for those folks who don’t frequent this list but who are watching the issue. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.ukhttp://inps.co.uk From: flexcoders@yahoogroups.comhttp://ups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Matt Chotin Sent: 02 November 2009 14:49 To: flexcoders@yahoogroups.comhttp://ups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Adobe comment on ASC-3136? It's deferred for a future Player from what I can tell. We know it's important to folks though. Sent from my phone. Please excuse brevity or typos.
[flexcoders] Re: Help with Arrays, ArrayCollections Repeaters
--- In flexcoders@yahoogroups.com, criptopus sd_br...@... wrote: 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. Arrays aren't bindable, so mx:ArrayCollection id = myLabelsAC source = {myLabels}/ Doesn't update when you change the array. Manually set the source property on myLabelsAC at the end of your function. HTH; Amy
[flexcoders] SSL certificate on linux machine
Hello all, I have a qustion abou HTTPs connections and certificate about AIR/Flex on linux. I have an appliaction built using flexbuilder which use URLloader to an HTTPs appliacion. To work correctly I need have ssl certificate installed before I use my application. On windows, I install cert using standard windows cert. storage. On MAC I can accept certificate when running my application. But only on linux (Ubuntu) I didn't found, howto install cacer permanently into a database and my application is asking me for unknown certificate agreement. I found http://kb2.adobe.com/cps/408/kb408085.html and http://labs.adobe.com/wiki/index.php/AIR_for_Linux:Release_Notes#Adobe_Unix_CertificateStore_Manager_.28aucm.29 but placing certificat
[flexcoders] Re: RemoteObject question/mystery
I know some of the code may be off, but I am trying to understand how a non called function (resultHandler) can return data to the called function in a different class. The way you are trying to do it, I don't think it can. So my question is, if the index.mxml calls the getAll function in the UserDAO class, will the getMyData function still receive the ArrayCollection from the resultHandler? In the code you provided, I don't see how it could because getAll() does not return an array. If I were to fire this off, till the result be that my users ArrayCollection in the index.mxml be populated in the end? Thanks! _users in resultHandler() will be populated but it will not be returned in Users.getAll(). If you want to use an ArrayCollection across multiple classes in Flex, you might consider making it a Singleton. If you need to manipulate the ArrayCollection, do it in the resultHandler(). I hope that helps. I will monitor this thread if you have any other questions.
[flexcoders] Spark effect skips/displaces component when played reverse
Hi, I have a problem with a combined move and rotate (3D) with a spark component. When the effects are played reverse the component is displaced when the effects begin to play. But I don't know why this happens. I have attached the simple example for that. Maybe there is another approach to achieve the same effect? Or am I doing something wrong? Any help appreciated. Markus ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/halo minWidth=1024 minHeight=768 creationComplete=creationCompleteHandler(event) fx:Script ![CDATA[ import mx.events.FlexEvent; import spark.effects.Move3D; import spark.effects.Rotate3D; private var myMove3D: Move3D; private var myRotate3D: Rotate3D; protected function creationCompleteHandler(event:FlexEvent):void { myRotate3D = new Rotate3D(myPanel); myRotate3D.angleXFrom = 0; myRotate3D.angleXTo = 77; myRotate3D.duration = 1000; myRotate3D.repeatCount = 1; myRotate3D.play(); myMove3D = new Move3D(myPanel); myMove3D.xFrom = 0; myMove3D.xTo = 300; myMove3D.duration = 1000; myMove3D.repeatCount = 1; myMove3D.play(); setTimeout(reverse, 3000); } private function reverse(): void { //Play reverse myRotate3D.play(null, true); myMove3D.play(null, true); } ]] /fx:Script s:Panel width=300 height=300 id=myPanel/ /s:Application
[flexcoders] Re: Casting down an object
Do you need A class objects (ie ones w/o the C property) in your app? If not just add the C property to the A class. It should still be converted correctly. If you still need the A class, add an exportAsB method to create a B class equivelent. --- In flexcoders@yahoogroups.com, bnsmeets bensme...@... wrote: Hi all, I'm wondering if it is possible to 'hack' some sort of downcasting into AS3. The context is, that I am using a generated webservice proxy from Flex 3, and want to be able to add custom (extra) properties to the generated valueobjects without having to adjust the code that parses the wsdl result into objects. So e.g. the webservice generates the class: class A { property A; property B; } I have my own class that is: class B extends A { property C; } When i call the generated webservice get all A's, it will return an array of A objects, what I am looking for is to convert that list into B objects. So the values of the properties that exist in the A counterpart, filled for a new B instance, with an empty C property. Any ideas? Cheers, Ben
[flexcoders] Re: RemoteObject question/mystery
how do I actually get the data back to a caller function? you can't. The request is async. The caller has long since finished executing when the result comes back. Have the resultHandler do whatever needs to be done with the result. --- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: Looking for a little education from all the people smarter than me of remoteObjects. I have always used the MXML version which includes the resultHandler attribute which made managing the returned data easy. However I never learned the AS version very well. I can create the remoteObject in AS and call its method, add the EventListener, but how do I actually get the data back to a caller function? index.mxml import org.mywindow.data.Users; [Bindable] public var users:ArrayCollection; public function getMyData():void { users = Users.getAll(); } for the User's getAll function I have something like: UserDAO.as ... public var _users:ArrayCollection; public function getAll():void { var UserDAO:RemoteObject = new RemoteObject(); UserDAO.destination = ColdFusion; UserDAO.source = org.mywindow.data.userDAO; UserDAO.getAll.addEventListener(ResultEvent.RESULT, resultHandler); UserDAO.getAll.addEventListener(FaultEvent.FAULT, faultHandler); } public function resultHandler(e:ResultEvent):ArrayCollection{ _users = e as ArrayCollection; return users; } I know some of the code may be off, but I am trying to understand how a non called function (resultHandler) can return data to the called function in a different class. So my question is, if the index.mxml calls the getAll function in the UserDAO class, will the getMyData function still receive the ArrayCollection from the resultHandler? If I were to fire this off, till the result be that my users ArrayCollection in the index.mxml be populated in the end? Thanks!
[flexcoders] Re: RemoteObject question/mystery
--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: Looking for a little education from all the people smarter than me of remoteObjects. I have always used the MXML version which includes the resultHandler attribute which made managing the returned data easy. However I never learned the AS version very well. I can create the remoteObject in AS and call its method, add the EventListener, but how do I actually get the data back to a caller function? index.mxml import org.mywindow.data.Users; [Bindable] public var users:ArrayCollection; public function getMyData():void { users = Users.getAll(); } for the User's getAll function I have something like: UserDAO.as ... public var _users:ArrayCollection; public function getAll():void { var UserDAO:RemoteObject = new RemoteObject(); UserDAO.destination = ColdFusion; UserDAO.source = org.mywindow.data.userDAO; UserDAO.getAll.addEventListener(ResultEvent.RESULT, resultHandler); UserDAO.getAll.addEventListener(FaultEvent.FAULT, faultHandler); } public function resultHandler(e:ResultEvent):ArrayCollection{ _users = e as ArrayCollection; return users; } I know some of the code may be off, but I am trying to understand how a non called function (resultHandler) can return data to the called function in a different class. So my question is, if the index.mxml calls the getAll function in the UserDAO class, will the getMyData function still receive the ArrayCollection from the resultHandler? If I were to fire this off, till the result be that my users ArrayCollection in the index.mxml be populated in the end? Thanks! You should never ignore the kind of compiler warning that you ought to be seeing here (implicit coercsion of ResultEvent to possibly unrelated type ArrayCollection). The first thing you should do is put a break point inside resultHandler and look at the e object in the variables window, to see what property of it might contain the ArrayCollection you're looking for. Then cast e[thatProperty] to ArrayCollection explicitly. The next thing you need to realize is that the code that is calling your event handler is deep in EventDispatcher, and it does not give a flying, er, hoot, what your function returns. In fact, I'd be really suprised if you are not getting a compiler or at least a run time error with your code as it is. Event handler functions should _always_ have a return type of void, which means that in your result handler you either need to work with the AsyncToken on the result (which you'd set up when you call the RemoteObject) or you need set a variable or call a function which both your result handler and whatever needs to use it have access to (in their scope). For more on using AsyncToken, see http://flexdiary.blogspot.com/2008/11/more-thoughts-on-remoting.html . HTH; Amy
[flexcoders] Re: AIR 1.5.1 Transaction issue: when begin() is called, it doesn't do anything.
I can recommend three things as I've been doing a fair amount of debugging lately: 1) Check out MonsterDebugger for debugging from your release build 2) Try opening your SQLConnection before calling begin(). I think begin opens a connection but I'm not entirely sure. Also try adding an event listener for the open event to ensure your connection is being opened as well. 3) How are you building the release build? Recently I'd experienced some issues related to an Ant build script that targeted Flash Player 10 while the Flex Debugger targeted 9.0.28. Setting the Ant script to target 9.0.28 cleared up my problems. Check this article for details: http://kb2.adobe.com/cps/404/kb404341.html --- In flexcoders@yahoogroups.com, handitan handi...@... wrote: 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] How do I add a tooltip to the divider in a HDividedBox?
Hi, I want to add a tooltip to the divider, I assume I want to use the BoxDivider class, but I'm not sure how to do it. thanks,
[flexcoders] Re: multiple filter function of combobox and two checkboxes
While I don't have an example handy I can hopefully put you on the path. First thing, it doesn't matter what controls you are using to set the filter: the filter will function in the exact same way. For CheckBox and ComboBox you pretty much just listen for the change event and filter when the event fires. Another thing to note is that ArrayCollection is basically just a wrapper for Array. So you can easily convert your ArrayCollection to an Array by calling the toArray method and then take advantage of Array's filter method (http://livedocs.adobe.com/flex/3/langref/Array.html#filter%28%29). When you're done just convert your Array back to an ArrayCollection with a statement like new ArrayCollection(myFilteredArray). --- In flexcoders@yahoogroups.com, stinasius stinas...@... wrote: 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
Re: [flexcoders] How do I add a tooltip to the divider in a HDividedBox?
You can create your own class that extends BoxDivider and has a custom ToolTip, and assign it to the HDividedBox using the dividerClass property: http://livedocs.adobe.com/flex/3/langref/mx/containers/DividedBox.html#dividerClass 2009/11/2 luvfotography ygro...@all-digital-links.com Hi, I want to add a tooltip to the divider, I assume I want to use the BoxDivider class, but I'm not sure how to do it. thanks,
[flexcoders] Re: Casting down an object
--- In flexcoders@yahoogroups.com, bnsmeets bensme...@... wrote: Hi all, I'm wondering if it is possible to 'hack' some sort of downcasting into AS3. The context is, that I am using a generated webservice proxy from Flex 3, and want to be able to add custom (extra) properties to the generated valueobjects without having to adjust the code that parses the wsdl result into objects. So e.g. the webservice generates the class: class A { property A; property B; } I have my own class that is: class B extends A { property C; } When i call the generated webservice get all A's, it will return an array of A objects, what I am looking for is to convert that list into B objects. So the values of the properties that exist in the A counterpart, filled for a new B instance, with an empty C property. Instead of having B extend A, instead have both A and B implement Interface I. Then use the Decorator pattern (there's a current feature on this on InsideRIA http://www.insideria.com/2009/10/decorator-design-pattern.html if you don't have the book AS3 Design Patterns) to have B wrap an A and reflect the properties that I requires it to have. So package { public interface I { function get prop1():String; function set prop1(s:String):void; function get prop2():String; function set prop2(s:String):void; } } package { public class A implements I { private var _prop1:String; private var _prop2:String; public function get prop1():String { return _prop1; } public function set prop1(s:String):void { _prop1=s; } public function get prop2():String { return _prop2; } public function set prop2(s:String):void { _prop2=s; } } } package { public class B implements I { private var _a:A; private var _c:String; public function B(a:A) { _a=a; } public function get prop1():String { return _a.prop1; } public function set prop1(s:String):void { a.prop1=s; } public function get prop2():String { return a.prop2; } public function set prop2(s:String):void { a.prop2=s; } public function get c():String { return _c; } public function set c(s:String):void { _c=s; } } } Now, any code that needs type information, you'll be looking for I, not A, because a B is not an A, it contains an A. For more on Interfaces, check out http://www.insideria.com/2009/10/interfaces-and-dynamic-class-i.html or http://flexdiary.blogspot.com/2009/01/example-of-casting-contets-of-swfloader.html . HTH; Amy
[flexcoders] Handling Relational Data in a Form?
I've created a web service that returns a dataset from some relational tables. Tables 1 and 2 are the source tables. View 1 is the selected data that I send out as XML from a web service for the Flex UI. View 1 lists out all of the operations and then a bunch of query stuff, I populate the operation with an 'x' if that operation is needed for the job or populate with a date if that operation is completed. When an operation isn't needed it returns NULL as not every job needs every operation. table 1: Jobs jobnum clientname qnty - jobA Client A 1 jobB Client B5000 table 2: Operations ID jobnumOperation Completed 1 jobALaser 10-01-09 2 jobAInsert10-02-09 3 jobAInk jet 10-01-09 4 jobB4 Color Press 10-02-09 5 jobBLaser 10-02-09 6 jobBInsertx View 1: AllJobs jobnum clientname qnty Laser InkJet 4ColorPress Insert jobAClient A1 10-01-09 10-01-09 Null 10-02-09 jobBClient B 5000 10-02-09 NULL 10-02-09 x I have my Flex UI setup to receive the View output as XML and then populate an Advanced Data Grid. I've got a form section below that populates with the job data when a row is selected. The form section is for viewing or updating operation dates. (The form also shows some info returned in the xml that I don't show in the grid since I ran out of screen space in the grid.) For updates, I was going to setup a loop to cycle through the webservice update operation. However, where I'm stumped is passing the query info needed. The SQL statement is straight forward where the parameters needed are jobnum and something to identify the operation. And this is where I'm stumped. I need to get the operationID from the operation table and I'm thinking it's not a good idea to query that into the view. That it would be better to have a seperate query for the operations that I could then call via another webservice or webservice operation call. But how would I get that related that into the form? Or I guess I could get the operationID in the grid, but hide those columns. The other idea was change the View to only show the operationID's and then have another webservice to relate the operationID to the operation dates. But that mean needing to have my datagrid have 2 seperate datasources or someway to merge the data from two seperate services. Any insight is greatly appreciated.
RE: [flexcoders] SWFLoader problem
Set visible=false until it is loaded 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 chandruflex Sent: Monday, November 02, 2009 4:55 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] SWFLoader problem In my application, I have a SWFLoader component, placed inside a Canvas container. I load a swf into the SWFLoader, dynamically. The problem is, when the swf file is loading, the display seems to be larger than the size of the enclosing Canvas container. But, after the swf has loaded completely, it perfectly fits into that Canvas. How do I avoid this problem. I do not want the swf file look larger than the enclosing Canvas, while it is loading. I am using Flex sdk 3.0.
RE: [flexcoders] event order issues
There should be an event when the result comes back from the db. You can re-synch then. 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: Monday, November 02, 2009 12:16 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] event order issues is there a way to dispatch the event from the command file? that would solve the problem Thanks for the help, Darrin On Mon, Nov 2, 2009 at 8:09 AM, Darrin Kay dar...@stop-ing.commailto:dar...@stop-ing.com wrote: I put in the trace, and it is going to the sort before the result is back from the db. Any suggestions? On Mon, Nov 2, 2009 at 7:42 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: 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.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Darrin Kay Sent: Sunday, November 01, 2009 11:07 PM To: flexcoders@yahoogroups.commailto: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
[flexcoders] Chet Haase explains the graphics stack in Flash Player
I'm looking for the video where Chet describes how the graphics object passes drawing commands to the Flash Player. It was something about how there is a stack of commands that gets called every frame render. Thanks,
[flexcoders] when is concatenatedMatrix set?
Can anyone tell me when concatenatedMatrix is set during instantiation? Or point me to an article would be great. Or the entire transform object for that matter? Thanks, Jason
[flexcoders] Tab control of repeater items
Hi all, I¹m creating an app that needs to make use of the tab control to cycle through the visible controls. Buttons, checkboxes etc are working great but I can¹t seem to be able to tab to the elements within my repeaters. Within the repeaters are custom components made up of things like textfields. I need each of the repeater¹s items to be tab enabled. I¹ve set them to tabEnabled, and set the repeater to have tabChildren enabled too. Any ideas?! Thanks!
Re: [flexcoders] Chet Haase explains the graphics stack in Flash Player
You can ask this question directly to Chet. He is very prompt answering any question through his blog. Here is the link - http://graphics-geek.blogspot.com/ On Mon, Nov 2, 2009 at 2:43 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: I'm looking for the video where Chet describes how the graphics object passes drawing commands to the Flash Player. It was something about how there is a stack of commands that gets called every frame render. Thanks,
[flexcoders] Skinning a container - Canvas
Hi, I see all the tutorials about skinning different components. What about skinning a canvas? I am trying to skin a Canvas - is that possible?
[flexcoders] Re: Handling Relational Data in a Form?
AS3 really goes bonkers with array handling. If I'm not mistaken, it looks like how you access array data is completely dependent on how the array is populated? I finally got an array to populate from my form and then retrieved the array data in a trace(). It also looks like I can create multiple parallel arrays which might solve a lot of problems. Array population code: var array:Array= new Array(); array.push({operationCompleted:Press10Env.text, jobnum:jobnum.text, resource:10 Envelope Press}); array.push({operationCompleted:Press2clr.text, jobnum:jobnum.text, resource:2 Color Press}); array.push({operationCompleted:Press4clrEnv.text, jobnum:jobnum.text, resource:4 Color Envelope Press}); array.push({operationCompleted:Press4clr.text, jobnum:jobnum.text, resource:4 Color Press}); array.push({operationCompleted:Press9Env.text, jobnum:jobnum.text, resource:9 Envelope Press}); array.push({operationCompleted:FlowMasterMM.text, jobnum:jobnum.text, resource:Flow Master MM}); array.push({operationCompleted:InkJet.text, jobnum:jobnum.text, resource:InkJet}); array.push({operationCompleted:Inserting.text, jobnum:jobnum.text, resource:Inserting}); array.push({operationCompleted:LaserLetter.text, jobnum:jobnum.text, resource:Laser Letter}); array.push({operationCompleted:LaserRoom.text, jobnum:jobnum.text, resource:Laser Room}); //var operationsCollection:ArrayCollection = new ArrayCollection(shopOperations); var index:int; for( index = 0; index array.length; index++ ) { trace(array[index].jobnum+ +array[index].resource+ +array[index].operationCompleted); } --- In flexcoders@yahoogroups.com, jc_bad28 jc_ba...@... wrote: I've created a web service that returns a dataset from some relational tables. Tables 1 and 2 are the source tables. View 1 is the selected data that I send out as XML from a web service for the Flex UI. View 1 lists out all of the operations and then a bunch of query stuff, I populate the operation with an 'x' if that operation is needed for the job or populate with a date if that operation is completed. When an operation isn't needed it returns NULL as not every job needs every operation. table 1: Jobs jobnum clientname qnty - jobA Client A 1 jobB Client B5000 table 2: Operations ID jobnumOperation Completed 1 jobALaser 10-01-09 2 jobAInsert10-02-09 3 jobAInk jet 10-01-09 4 jobB4 Color Press 10-02-09 5 jobBLaser 10-02-09 6 jobBInsertx View 1: AllJobs jobnum clientname qnty Laser InkJet 4ColorPress Insert jobAClient A1 10-01-09 10-01-09 Null 10-02-09 jobBClient B 5000 10-02-09 NULL 10-02-09 x I have my Flex UI setup to receive the View output as XML and then populate an Advanced Data Grid. I've got a form section below that populates with the job data when a row is selected. The form section is for viewing or updating operation dates. (The form also shows some info returned in the xml that I don't show in the grid since I ran out of screen space in the grid.) For updates, I was going to setup a loop to cycle through the webservice update operation. However, where I'm stumped is passing the query info needed. The SQL statement is straight forward where the parameters needed are jobnum and something to identify the operation. And this is where I'm stumped. I need to get the operationID from the operation table and I'm thinking it's not a good idea to query that into the view. That it would be better to have a seperate query for the operations that I could then call via another webservice or webservice operation call. But how would I get that related that into the form? Or I guess I could get the operationID in the grid, but hide those columns. The other
Re: [flexcoders] Handling Relational Data in a Form?
jc_bad28 wrote: I've created a web service that returns a dataset from some relational tables. Tables 1 and 2 are the source tables. View 1 is the selected data that I send out as XML from a web service for the Flex UI. View 1 lists out all of the operations and then a bunch of query stuff, I populate the operation with an 'x' if that operation is needed for the job or populate with a date if that operation is completed. When an operation isn't needed it returns NULL as not every job needs every operation. table 1: Jobs jobnum clientname qnty - jobA Client A 1 jobB Client B5000 table 2: Operations ID jobnumOperation Completed 1 jobALaser 10-01-09 2 jobAInsert10-02-09 3 jobAInk jet 10-01-09 4 jobB4 Color Press 10-02-09 5 jobBLaser 10-02-09 6 jobBInsertx View 1: AllJobs jobnum clientname qnty Laser InkJet 4ColorPress Insert jobAClient A1 10-01-09 10-01-09 Null 10-02-09 jobBClient B 5000 10-02-09 NULL 10-02-09 x I have my Flex UI setup to receive the View output as XML and then populate an Advanced Data Grid. I've got a form section below that populates with the job data when a row is selected. The form section is for viewing or updating operation dates. (The form also shows some info returned in the xml that I don't show in the grid since I ran out of screen space in the grid.) For updates, I was going to setup a loop to cycle through the webservice update operation. However, where I'm stumped is passing the query info needed. The SQL statement is straight forward where the parameters needed are jobnum and something to identify the operation. And this is where I'm stumped. I need to get the operationID from the operation table and I'm thinking it's not a good idea to query that into the view. Why not? I don't see what the problem would be. That it would be better to have a seperate query for the operations that I could then call via another webservice or webservice operation call. But how would I get that related that into the form? Or I guess I could get the operationID in the grid, but hide those columns. Your datagrid can have a source containing the operations id - it's not compulsory for a datagrid to display all the data from the data source. The other idea was change the View to only show the operationID's and then have another webservice to relate the operationID to the operation dates. But that mean needing to have my datagrid have 2 seperate datasources or someway to merge the data from two seperate services. Don't do it - it's totally unnecessary. Any insight is greatly appreciated. No particular insight - just an opinion - I really don't see the difficultly. Paul
[flexcoders] Garbage collection crashing flash player
Hey flexers, My team has been building an application that's graphically heavy. The heaviest portion consists of two sprites that are ~4000x4000 pixels and have a bunch of sprite children and ~20 bitmaps each. The content ends up being ~30 MB for both sprites total, give or take 20 MB. When it's time to switch to new sprites with new content we make sure there are no more references to the two old sprites. I've verified that garbage collection does clean up the old content each time and memory stays about even. However, quite commonly (maybe 1 out of 3 times) when switching to two new sprites the Flash Player will crash. I have good reason to believe it's the act of garbage collection that is causing this crash. Here's why: (1) If I'm in the Flex Profiler and I've switched to two new sprites and then I hit run garbage collection it will sometimes crash right at that moment. (2) If I use Grant Skinner's posted hack of forcing garbage collection it will sometimes crash right when the garbage collection is forced. (3) If I keep a reference to all the old sprites (so garbage collection won't collect them) it doesn't crash even after switching to new sprites over 25 times, however the application uses more and more memory. Can someone provide some enlightenment as to how we proceed? We don't want the application crashing frequently but we also don't want to hog the user's memory (and eventually cause a crash anyway). Making the sprites smaller is an obvious route but one of the last routes we want to take because they're that large for a reason. Thanks. We appreciate any help offered! Aaron
[flexcoders] Re: AIR 1.5.1 Transaction issue: when begin() is called, it doesn't do anything.
Hi Sean, Thx for the suggestions. I believe that I am kind of have an idea on what causing the issue of this transaction to suddently stop working. Since I thought it might be 1.5.1 SDK issue, so I build it using 1.5.2 SDK but the result is the same. All I can tell right now is this issue seems to only appear on Windows but not on Mac. Both have AIR runtime version 1.5.2. So be warn for those of you who are using transaction heavily (my app needs to do at least lots of transaction where each transaction process 10 - 200 inserts). I am still building this app through FlexBuilder. Will migrate to Ant pretty soon. --- In flexcoders@yahoogroups.com, seanmcmonahan s...@... wrote: I can recommend three things as I've been doing a fair amount of debugging lately: 1) Check out MonsterDebugger for debugging from your release build 2) Try opening your SQLConnection before calling begin(). I think begin opens a connection but I'm not entirely sure. Also try adding an event listener for the open event to ensure your connection is being opened as well. 3) How are you building the release build? Recently I'd experienced some issues related to an Ant build script that targeted Flash Player 10 while the Flex Debugger targeted 9.0.28. Setting the Ant script to target 9.0.28 cleared up my problems. Check this article for details: http://kb2.adobe.com/cps/404/kb404341.html --- In flexcoders@yahoogroups.com, handitan handitan@ wrote: 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.
RE: [flexcoders] Chet Haase explains the graphics stack in Flash Player
... and I also try to get around to answering questions on this group when I can. I think the video you're referring to is one of the Top Drawer ones (probably the one that dealt with drawing the graphics shapes), which were some of the first videos I posted on my blog. Or maybe it was the one I did for the Flex in a Week series: http://graphics-geek.blogspot.com/2008/11/video-custom-flash-graphics.html If you want to poke around, you can see all of the videos I've posted on my blog under the video tag: http://graphics-geek.blogspot.com/search/label/video Chet. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Vivian Richard Sent: Monday, November 02, 2009 3:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Chet Haase explains the graphics stack in Flash Player You can ask this question directly to Chet. He is very prompt answering any question through his blog. Here is the link - http://graphics-geek.blogspot.com/ On Mon, Nov 2, 2009 at 2:43 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.commailto:dorkiedorkfromdorkt...@gmail.com wrote: I'm looking for the video where Chet describes how the graphics object passes drawing commands to the Flash Player. It was something about how there is a stack of commands that gets called every frame render. Thanks,
[flexcoders] Firebug tool
Is there's any tool for flex similar to firebug? Thanks kanu
Re: [flexcoders] Chet Haase explains the graphics stack in Flash Player
Thanks On Mon, Nov 2, 2009 at 9:11 PM, Chet Haase cha...@adobe.com wrote: … and I also try to get around to answering questions on this group when I can. I think the video you’re referring to is one of the “Top Drawer” ones (probably the one that dealt with drawing the graphics shapes), which were some of the first videos I posted on my blog. Or maybe it was the one I did for the “Flex in a Week” series: http://graphics-geek.blogspot.com/2008/11/video-custom-flash-graphics.html If you want to poke around, you can see all of the videos I’ve posted on my blog under the video tag: http://graphics-geek.blogspot.com/search/label/video Chet. *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Vivian Richard *Sent:* Monday, November 02, 2009 3:07 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Chet Haase explains the graphics stack in Flash Player You can ask this question directly to Chet. He is very prompt answering any question through his blog. Here is the link - http://graphics-geek.blogspot.com/ On Mon, Nov 2, 2009 at 2:43 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: I'm looking for the video where Chet describes how the graphics object passes drawing commands to the Flash Player. It was something about how there is a stack of commands that gets called every frame render. Thanks,
[flexcoders] Re: multiple filter function of combobox and two checkboxes
i know that the filter function will work the same way. but i have a problem with integrating a checkbox filter into a large multi filter function. let me explain... i have a number of controls that am currently using to filter data from a database. so i developed a multi filter function to handle the filtering depending on what control is picked by the user. it works well but one problem i have is that i have failed to find a way to include a checkbox control into the multi filter function. below is the multi filter function am using and would like to include a checkbox filter to it. private var sliderFromValue : Number = 0; private var sliderToValue : Number = 300; private var selectedCity : String = All; private var selectedLocation : String = All; private var selectedValue: Boolean; private var poolSelected: Boolean = false; private function onSliderChange(event:SliderEvent):void { var slider:Slider = Slider(event.currentTarget) ; sliderFromValue = priceSlider.values[0]; sliderToValue = priceSlider.values[1]; filterGrid() ; currentState = ''; } private function cityChangeHandler(event:Event):void { if( city_cb.selectedItem != null ) selectedCity = city_cb.selectedLabel; filterGrid(); currentState = ''; } private function locationChangeHandler(event:Event):void { if( lct_cb.selectedItem != null ) selectedLocation = lct_cb.selectedLabel; filterGrid(); currentState = ''; } private function categoryChangeHandler(event:Event):void { if(category.selectedValue != null) selectedValue = category.selectedValue; filterGrid(); currentState = ''; } private function poolFilter():void { poolSelected = pool_ckb.selected; filterGrid(); currentState = ''; } private function filterGrid() :void { dataAr.filterFunction=myFilterFunction; dataAr.refresh(); } private function myFilterFunction(item:Object): Boolean { return(item.price = sliderFromValue item.price = sliderToValue) (item.city == selectedCity || selectedCity == All) (item.location == selectedLocation || selectedLocation == All) (item.category == category.selectedValue) (item.pool == poolSelected); } the individual filter functions are attached to individual controls but the poolfilter is the one that is troubling me.
[flexcoders] Re: Firebug tool
I use FlexSpy (http://code.google.com/p/fxspy/), but I know there are others. Chris.