[flexcoders] Re: AdvancedDataGrid update problems
I'll speculate openly in case someone picks up on this. Could there be some sort of race condition in the way AdvancedDataGrid works. Ie. redraws or updates the scroll bar too early in reaction to sorting? (ie. before the collection has had a chance to finish sorting itself) Is this kind of bug even possible in the flash runtime, keeping in mind that it is single-threaded? --- In flexcoders@yahoogroups.com, kallebertell [EMAIL PROTECTED] wrote: I'm facing a problem where an advanced data grid (adg) with a hierarchical collection (~500-1000 rows) doesn't redraw properly after sorting is applied to the underlying collection. The fun bit is that it isn't reproduceable. The occurance seems to be completely random but somehow related to sorting, as it seems to rear it's head only then (but not always). Scrolling after the adg is messed up doesn't improve it either, but at some point causes null reference exceptions onMouseRollOver. The advanced data grid is in a minimiziable container. If the container is minimized and then restored, the adg looks normal again (ie. redraws correctly). Although this rarely happens on my dev machine it happens more often for our customers, which might indicate that it's more frequent on slower machines. I'm looking for any clue or people who have also experienced this weird behaviour in adg. Thanks.
[flexcoders] Re: AdvancedDataGrid update problems
I finally managed to reproduce the bug (or one of the bugs). By scrolling to the very bottom and sorting according to any column, it seems to sort, but the last items seen in the grid shouldn't be last. Turns out the grid just hasn't updated the view properly or too early somehow. A delayed call to invalidateList after sorting seems at first to fix this, but it's possible to get the grid into an invalid state despite this. Dispatching a reset event seemed better. Would be nice to figure out the cause since this bandage solution hurts my eyes. --- In flexcoders@yahoogroups.com, kallebertell [EMAIL PROTECTED] wrote: I'll speculate openly in case someone picks up on this. Could there be some sort of race condition in the way AdvancedDataGrid works. Ie. redraws or updates the scroll bar too early in reaction to sorting? (ie. before the collection has had a chance to finish sorting itself) Is this kind of bug even possible in the flash runtime, keeping in mind that it is single-threaded? --- In flexcoders@yahoogroups.com, kallebertell kallebertell@ wrote: I'm facing a problem where an advanced data grid (adg) with a hierarchical collection (~500-1000 rows) doesn't redraw properly after sorting is applied to the underlying collection. The fun bit is that it isn't reproduceable. The occurance seems to be completely random but somehow related to sorting, as it seems to rear it's head only then (but not always). Scrolling after the adg is messed up doesn't improve it either, but at some point causes null reference exceptions onMouseRollOver. The advanced data grid is in a minimiziable container. If the container is minimized and then restored, the adg looks normal again (ie. redraws correctly). Although this rarely happens on my dev machine it happens more often for our customers, which might indicate that it's more frequent on slower machines. I'm looking for any clue or people who have also experienced this weird behaviour in adg. Thanks.
[flexcoders] AdvancedDataGrid update problems
I'm facing a problem where an advanced data grid (adg) with a hierarchical collection (~500-1000 rows) doesn't redraw properly after sorting is applied to the underlying collection. The fun bit is that it isn't reproduceable. The occurance seems to be completely random but somehow related to sorting, as it seems to rear it's head only then (but not always). Scrolling after the adg is messed up doesn't improve it either, but at some point causes null reference exceptions onMouseRollOver. The advanced data grid is in a minimiziable container. If the container is minimized and then restored, the adg looks normal again (ie. redraws correctly). Although this rarely happens on my dev machine it happens more often for our customers, which might indicate that it's more frequent on slower machines. I'm looking for any clue or people who have also experienced this weird behaviour in adg. Thanks.
[flexcoders] Common mistakes when modularizing a flex application
After trying to refactor some the views of our application into modules (and failing miserably) I'm finally frustrated enough to post a cry for help here and see if someone could kindly offer me a clue. I have a module (extends ModuleBase) which implements my IViewModule interface, which is a shared definition between the main application and the module. The loading is done like this: function loadModule() : void { var info : IModuleInfo = ModuleManager.getModule(module.swf); info.addEventListener(ModuleEvent.READY, moduleReadyHandler); info.addEventListener(ModuleEvent.ERROR, moduleErrorHandler); info.load(); } function moduleReadyHandler(event:ModuleEvent) : void { var module : IViewModule = event.module.factory.create() as IViewModule; if (module == null) throw new Error(I'm null, therefore I ain't); } I created a test module with some of it's own unique classes and this worked fine. Swell, I thought, and commenced refactoring a view of ours into a module and removed any reference to its main class from the base application. Loading the module seems to work fine, but the call to factory.create() just returns null. If I add references to the view's main class into the base application so the class definitions are included in the base application the create() call returns a proper instance, but that goes against the whole point of modules. I've tried playing around with application domains and module optimizations but I reckon they aren't the problem. I'm probably missing something vital but I have no clue what it could be. Which finally leads me to my question: What are the most common mistakes which would cause this?
[flexcoders] Re: Common mistakes when modularizing a flex application
By some sort of Murphy's law and I got it working right after I posted this. I don't know why it is working now and not before though. I'm suspicious of flex builder's module compilations and of IE's caching mechanisms, but alas, I have no proof. --- In flexcoders@yahoogroups.com, kallebertell [EMAIL PROTECTED] wrote: After trying to refactor some the views of our application into modules (and failing miserably) I'm finally frustrated enough to post a cry for help here and see if someone could kindly offer me a clue. I have a module (extends ModuleBase) which implements my IViewModule interface, which is a shared definition between the main application and the module. The loading is done like this: function loadModule() : void { var info : IModuleInfo = ModuleManager.getModule(module.swf); info.addEventListener(ModuleEvent.READY, moduleReadyHandler); info.addEventListener(ModuleEvent.ERROR, moduleErrorHandler); info.load(); } function moduleReadyHandler(event:ModuleEvent) : void { var module : IViewModule = event.module.factory.create() as IViewModule; if (module == null) throw new Error(I'm null, therefore I ain't); } I created a test module with some of it's own unique classes and this worked fine. Swell, I thought, and commenced refactoring a view of ours into a module and removed any reference to its main class from the base application. Loading the module seems to work fine, but the call to factory.create() just returns null. If I add references to the view's main class into the base application so the class definitions are included in the base application the create() call returns a proper instance, but that goes against the whole point of modules. I've tried playing around with application domains and module optimizations but I reckon they aren't the problem. I'm probably missing something vital but I have no clue what it could be. Which finally leads me to my question: What are the most common mistakes which would cause this?
[flexcoders] Re: Common mistakes when modularizing a flex application
Now I figured it out when getting the same problem again. Even a new instance of a Internet Explorer window will get swf modules from some browsing cache. Whilst not the great technical conundrum I expected it to be, it's an easy pitfall to fall in. So when developing, see to it that your browser doesn't load cached content. --- In flexcoders@yahoogroups.com, kallebertell [EMAIL PROTECTED] wrote: By some sort of Murphy's law and I got it working right after I posted this. I don't know why it is working now and not before though. I'm suspicious of flex builder's module compilations and of IE's caching mechanisms, but alas, I have no proof. --- In flexcoders@yahoogroups.com, kallebertell kallebertell@ wrote: After trying to refactor some the views of our application into modules (and failing miserably) I'm finally frustrated enough to post a cry for help here and see if someone could kindly offer me a clue. I have a module (extends ModuleBase) which implements my IViewModule interface, which is a shared definition between the main application and the module. The loading is done like this: function loadModule() : void { var info : IModuleInfo = ModuleManager.getModule(module.swf); info.addEventListener(ModuleEvent.READY, moduleReadyHandler); info.addEventListener(ModuleEvent.ERROR, moduleErrorHandler); info.load(); } function moduleReadyHandler(event:ModuleEvent) : void { var module : IViewModule = event.module.factory.create() as IViewModule; if (module == null) throw new Error(I'm null, therefore I ain't); } I created a test module with some of it's own unique classes and this worked fine. Swell, I thought, and commenced refactoring a view of ours into a module and removed any reference to its main class from the base application. Loading the module seems to work fine, but the call to factory.create() just returns null. If I add references to the view's main class into the base application so the class definitions are included in the base application the create() call returns a proper instance, but that goes against the whole point of modules. I've tried playing around with application domains and module optimizations but I reckon they aren't the problem. I'm probably missing something vital but I have no clue what it could be. Which finally leads me to my question: What are the most common mistakes which would cause this?
[flexcoders] Re: Sorting behaviour of AdvanceDataGridControl
I don't have any suggestions, but we have this problem too. In fact if you have a list of items sorted according to a specific column, and change a property of an item in the collection unrelated to the sorting; it often reorders items in the collection if their sorting properties are equal. To the user this behaviour seems very erratic. Afaik. this behaviour is somewhere in ArrayCollection (or its supertypes) and not in the AdvancedDataGrid. --- In flexcoders@yahoogroups.com, mishrabagish [EMAIL PROTECTED] wrote: I have a ADC in my application . I click on column header to sort some column and the edit some cell in the same column. The moment i leave the row the ADC is sorts the data again to fit the new value at some sorted position. I want to stop this behavior as it happens in excel. I.e in excel if you sort a column and edit some cell in same column , excel don't re-sort the data. Any suggestions?
[flexcoders] Default sorting direction in AdvancedDataGrid
Is there any way to affect the default sorting direction in an AdvancedDataGrid? With this I mean the direction of the sort when you the first time click the column header. sortDescending in AdvancedDataGridColumn doesn't seem to affect it at least. Thanks.
[flexcoders] Tree and re-drawing
I have a tree which has a filtered collection (and filtered child collections) as a dataprovider. When I remove the filter and refresh the collection the tree doesn't re-draw. Calling invalidateList from Tree makes it redraw, but it doesn't create scrollbars even though the list is too long to show. Moreover, afterwards it seems to behave erratically as if it was in some inconsistent state, so I've not used this solution. Changing dataProvider does also redraw the tree, but then open items and selected items are lost. This is fixable through by keeping track of the open items and selected item and re-setting them, but the selected item doesn't get drawn as selected when done at the same time as changing the dataProvider. This in turn is fixable by doing a delayed select through a setTimeout. It works, great, but it's a lot of tape and glue. Anyone know a clean proper working solution? I've tried invalidating everything through the public API to no avail.
[flexcoders] Automated User Interface Testing
I've been trying to evaluate available UI testing tools for flex. We have three candidates: QuickTest Professional with flex3 plugin - Couldn't get macro recording to work with IE7 (pretty bad since we got vista machines here and can't get those downgraded to ie6) - vbscript-like macros - Unclear how to include into continuous integration RIATest - The macro recording utility threw actionscript exceptions - actionscript-like macros - Should be easy to include into continuous integration FunFX - Free - No macro recording utilities - Ruby macros - Should be easy to include into continuous integration I played around a bit with RIATest and QTP, and watched a demo for FunFX. None of them seem distinctly better than the other. FunFx didn't have macro-recording, but the other two didn't exactly offer a spotless macro-recording experience. Has anyone used any of these tools successfully in a project? Did you use it in continuous integration? Is there some other options which I haven't looked into?
[flexcoders] Datagrid with different objects in each cell
I have a case of a datagrid where I have to fetch a value from different objects depending on the column. ---XA---B---C---D- 1--X1---A1--B1--C1--D1 2--X2---A2--B2--C2--D2 3--X3---A3--B3--C3--D3 4--X4---A4--B4--C4--D4 The datagrid's dataprovider is an ArrayCollection of objects of type X. What I'm trying to do is showing relations between objects of type X to types A, B, C and D. These relations are objects themselves and have their own properties. It is this relational property I want to display. I've solved this by having special column which gets the object (A,B,C,D) they're being relating to passed into them. I then use a special renderer which overrides grabs the object it's being related to (A,B,C or D) from its parent column; and uses this info to pick out the correct (overriding set data) relation object from the X object. This all works fine, until I try to sort one of the special columns; and I do need to be able to sort them. I almost got it working by doing a custom sortCompareFunction in the column, but then it fails on an exception, Error: Find criteria must contain at least one sort field value., although it seemed to get the sorting done. Diving into the source it looks like it is a strong assumption (at least in sorting) that each row in the datagrid is representing a property from the same object, which of course it isn't for me. I thought I'd put a message here before continuing hacking away at this. Anyone done something similar to this and is it possible to do this elegantly?
[flexcoders] Re: Datagrid with different objects in each cell
Thanks. To complicate things further I have to be able add new columns dynamically which are the same kind of relational columns. For now I managed to solve it with a hack. I abandoned setting the actual relation object into the renderer, and instead just use the same object everywhere on the same row. I set a fake dataField property to a property which exists in the X object, and then just not use it for rendering but set the text I want in the custom renderer. Afaik. all sorting etc. works correctly now and no exceptions are being thrown. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: You could pre-process the different objects into a collection of display objects. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kallebertell Sent: Friday, March 28, 2008 8:03 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid with different objects in each cell I have a case of a datagrid where I have to fetch a value from different objects depending on the column. ---XA---B---C---D- 1--X1---A1--B1--C1--D1 2--X2---A2--B2--C2--D2 3--X3---A3--B3--C3--D3 4--X4---A4--B4--C4--D4 The datagrid's dataprovider is an ArrayCollection of objects of type X. What I'm trying to do is showing relations between objects of type X to types A, B, C and D. These relations are objects themselves and have their own properties. It is this relational property I want to display. I've solved this by having special column which gets the object (A,B,C,D) they're being relating to passed into them. I then use a special renderer which overrides grabs the object it's being related to (A,B,C or D) from its parent column; and uses this info to pick out the correct (overriding set data) relation object from the X object. This all works fine, until I try to sort one of the special columns; and I do need to be able to sort them. I almost got it working by doing a custom sortCompareFunction in the column, but then it fails on an exception, Error: Find criteria must contain at least one sort field value., although it seemed to get the sorting done. Diving into the source it looks like it is a strong assumption (at least in sorting) that each row in the datagrid is representing a property from the same object, which of course it isn't for me. I thought I'd put a message here before continuing hacking away at this. Anyone done something similar to this and is it possible to do this elegantly?