[flexcoders] Advanced DataGrid Grouped Row Conditional
I've written a custom AdvancedDataGridGroupItemRenderer to provide some checkbox and summary type information but I've run into a wall on a couple issues. In my createChildren function - how can I tell when I am rendering the Top/Parent/Root node vs. a child row? i.e. I don't want to render a checkbox on the "folder" level row, but I do want it on the leaf/children rows. I guess knowing the correct terminology of these things would help. I spent a while looking for examples, but really didn't find anything that nailed this question for me. Also: When rendering these parent rows, is there a way to control what data goes into the other columns? The child information is rendering fine for the 2nd, 3rd etc... columns, but I want to show something different in these columns for the parent row. Again - the terminology might make my google help searches more likely to succeed. M@
[flexcoders] JSON service calls /Jayrock
Trying to put a front end to a service that uses not only JSON serialization but also the POST/RESPONSE functionality. I'm wondering how others are doing this. Is there something in the Adobe JSON library that enables this? I've found lots of good sterilization examples, but they use something other than the JSON formatted HTTP GET calls (webservices, PHP http services etc...) More info: The service I wish to consume is developed in Jayrock - so it can create a javascript proxy class to make the calls - but this seems to be adding a layer that I would like to not have. Any pointers/advice welcome. Feel free to say, "Duh...", as I have no pride left. M@
[flexcoders] Re: Adding custom events to the pre-loading sequence
hannes: That is exactly what I was looking for. Thank you! M@
[flexcoders] BindSetter to an ArrayCollection's Length property: Firing far too often...
In the following snippets of code: --- var watcherSetter:ChangeWatcher = BindingUtils.bindSetter(createPoints, pointArrayModel, "length"); --- private var lastPointLength:int = 0; private function createPoints(v:int):void { myModel.logInfo("pathView.createPoints, last=" + lastPointLength + " new = " + v); if (lastPointLength != v) { lastPointLength = v; doSomeThingWithPoints(); } } --- The handler seems to fire WAY too many times. The first condition statement shouldn't even be necessary, but I end up with log items like this: 2:33:26:(0.001s) - pathView.createPoints, last=4 new = 4 2:33:26:(0.001s) - pathView.createPoints, last=4 new = 4 2:33:26:(0.005s) - pathView.createPoints, last=4 new = 4 2:33:26:(0.001s) - pathView.createPoints, last=4 new = 4 Which shouldn't happen... the length didn't change so why did the binding fire? Often it returns very large values for the length of the arrayCollection... potentially significant numbers : 13421772 and 65280. They show up in the log like this: 2:33:26:(0.004s) - pathView.createPoints, last=4 new = 65280 2:33:26:(0.001s) - pathView.createPoints, last=65280 new = 4 2:33:26:(0.001s) - pathView.createPoints, last=4 new = 4 --- 2:33:26:(0.001s) - pathView.createPoints, last=4 new = 4 2:33:26:(0.003s) - pathView.createPoints, last=4 new = 13421772 2:33:26:(0.001s) - pathView.createPoints, last=13421772 new = 4 2:33:26:(0.001s) - pathView.createPoints, last=4 new = 4 I'm investigating if there's a run away loop somewhere in out codebase, or some sort of initialization/sequencing error - but I'm getting no stack overruns and none of our error handling is firing. I'm probably doing something stupid completely unrelated to binding, so if anyone recognizes this type of behavior, please let me know. Thanks, M@
[flexcoders] Re: WebService performance with large XML
I might have found a solution to my own problem. Here is the current code: service = new WebService(); service.GetProject.resultFormat = "e4x"; //Increases speed of return 10 fold service.useProxy=false; service.wsdl = OurModelLocator.getInstance()[EMAIL PROTECTED]; service.addEventListener("result", responder.result); service.addEventListener(FaultEvent.FAULT, faultHandler); service.loadWSDL(); A colleague suggested the resultFormat change, which has made all the difference. Now, however, I must rewrite all of my parsing code. M@
[flexcoders] WebService performance with large XML
The application we're developing requires me to return a block of XML from the database, and we're doing this with a webservice. We have a current version of the application written in Flash which returns and consumes the same webservice call in under a second. The same webservice call made from Flex takes upwards of 10 seconds. I'm theorizing it's because the e4x engine is taking a very long time parsing the returned XML. I have the timestamp directly before the webservice.methodName call and again as the first line in the result handling function - so it's none of my code involved in the measurement. I'm looking for some more details on how Flex is making this webservice call and specifically how it's dealing with the results, and if there's an opportunity for me to alter how it processes the results. I'm thinking about making this one call use another data connectivity technique, like fluorine or web orb. M@
[flexcoders] Flex 2 Profiler
I've found several articles that reference the flex profiler - but I am at a loss as to where it is. There are some recent posts here about the Flex 3 profiler, but I am looking for one that will work with a flex builder 2 project. I don't have the profile.war file on my dev system (installed Flex Builder 2) or the build machine (installed Flex 2 SDK). Any hints? M@
[flexcoders] Adding custom events to the pre-loading sequence
I've built a preloader - and it works fine, but it "hides itself" a little too soon. I load a few things from the server after the application is running, and want that preloader to stick around until a specific result method has fired. I can't figure out how to do this - how to access the custom preloader from inside my application or how to fire an event to something the preloader has access too. I've spent a while on Jessie's blog, and a couple others, but still no joy. M@
[flexcoders] Retype Passowrd validation
I'm creating a registration form, and need to validate that a "Retype password" == "Original password" validator. It's as simple as "TXT_password1 == TXT_passowd2" Any advice? Right now I've got a global "validate form" function and I just do the logic in there, but I'd like that whole routine to be implemented by validator objects. M@
[flexcoders] How to parse objectProxy array vs. single items
I'm pretty sure I'm doing something wrong - I get an objectProxy back from a webservice with a list of items - sometimes the list is empty, sometimes it has 1 item, sometimes is has many. My code is "working," but it smells bad - I have to check if the object in question has a .length property - and access it differently. I am currently parsing this array like this: // Parse the icons var testType:Object = op.item; if (testType != null) { if (testType.length != null) //more than one group { for( var i:int; i
[flexcoders] Communicating with modules
Sorry if this seems dense: But how do I communicate to and from modules? I've got them compiling and loading fine, but I'm having a hard time finding a clear example of how to communicate from module to application and back. M@
[flexcoders] Reporting Subversion Revision in Flex Application?
Shortest way to ask this question I think is: Can I show the Subversion Revision # of the application's mxml file in the application itself? For example when someone went "Help->About" it could show "Version 1.3 revision 234" information? I'd like this as a verification for QA etc... so they KNOW what code base they are on. We don't currently have an automated build system, which could probably do this quite easily. So while I'd love to hear how people are doing that, I'd also like to know if there's an easy way to do it without a build system. M@
[flexcoders] Load MXML at run time?
I'm designing what is in essence a custom registration form, so clients of our flex app can design their own registration information. I'd like to try to store MXML somewhere on the server or perhaps the database and render it at runtime based on what client is using the application. For example: Some clients want an installation where they collect a zip code, while another may want to collect opt-in/out information. I'd like to store this in MXML and render it at run time inside my registration form. Anyone done anything like this or seen it done? M@
[flexcoders] How to log "Application Closed" implicitly
In an effort to record "session time" that a user spends in my flex application I'm trying to capture the application closing event and log information before the user leaves. Currently I can make a webservice call from a function called from the ExternalInterface if I return some text to show in the "Are you sure you want to navigate away from this page" dialog box that the browser displays. The real problem is, if I don't return any text, the browser calls before my webservice call is made, as if the browser will not allow any additional requests once the user has begun the page closing function. Details: I have a unload function in actionscript that I register with the External Interface call. It makes a webservice call first, and then returns a string with text or an empty string. In my index.template.html file, I set the window.onbeforeunload to a function that calls my actionscript function. If my actionscript function returns an a string everything works, the webservice call logs the user logged out and the browser displays the dialog. If my actionscript function returns an empty string then no webservice call is recorded, the browser closes and my server is oblivious to the fact that the user is gone.