Flex :: Grid Renderers Updating Without UpdateDisplayList Being Called
Oct 14, 2010
I have an item renderer for a grid that has a fairly basic updateDisplayList function:
override protected function updateDisplayList( w : Number, h : Number ) : void
{
super.updateDisplayList( w, h );
var labelWidth : Number = Math.min( _labelDisplay.measuredWidth, w );
[Code]....
The next time I scroll the renders update to look like they should - but updateDisplayList is NOT called here (on the renderes). All that happens is that the renderers are re-positioned in the grid. Both the background and the label are displayed incorrectly initially so it's not just the label mis-behaving.
View 1 Replies
Similar Posts:
Jan 6, 2012
So updateDisplayList is for laying out, positioning and sizing a component's children. It seems a waste to me, however, to have all that code running every time a render is called, even if no changes have been made to the relevant properties or child properties.The way I get around this for performance's sake (working on mobile) is to set a flag inside of my overridden updateDisplayList that lets a big part of my own sizing/positioning code run only the first time.Is this a bad idea/ big mistake? I just can't see the benefit to letting it run every time otherwise if I don't expect anything that affects sizing/positioning to change.
View 1 Replies
Jul 14, 2010
In flex component life cycle, after we make some change in a components property, invalidation methods schedules a call to methods like commitProperties, updateDisplayList, etc for some later time. I need to call the updateDisplayList instantaneously. Is there some direct way to do this.
Currently, both the labels are changed simultaneously after completion of the loop. Instead I need it to work like this, to first render the updated 'myButton1' label then enter the loop and then update myButton2's label. I know, it is elastic race track issue, but isn't there some way to achieve this ?[code]...
View 4 Replies
Jul 30, 2010
Overview: The code giving me the problem is deployed here: [URL] The problem I am running into is that a certain sequence of actions (I don't fully understand how or why) is causing my calls to invalidateDisplayList to fail to produce a subsequent call to updateDisplayList. What I know is that during this period, some other visual effects will fail to occur (such as changing the width of a component or the addition of a new child).
Example: The program below draws two columns of horizontal lines. The column on the left is drawn during commitProperties, the column on the right is drawn during updateDisplayList. A certain sequence of actions can cause the right column to stop updating.
To trigger this bug: First add a new item. Now hit the start button and a bar starts filling up. If you press the add row button, the right column and the filling bar both stop growing. The left column continues unfettered. The extra component won't appear until the last line of the if statement in TEComputeRow.tick() doesn't execute for a frame. Click on the stop button to halt the execution of the block inside the if statement in TEComputeRow.tick() and everything goes back to normal.
[Code]...
View 2 Replies
Jun 24, 2011
I have a custom component which is an HBox & I'm trying to resize a child which happens to be an image. This is image is inside a VBox which is also a child of the HBox. I have a number of these images so In UpdateDisplayList I call:myimageArray[0-5].setActualSize(50,50);but the image is never resized it just stays a large default size. The images source is a url path and I'm wondering if that is what is causing the problem?
View 1 Replies
Jan 5, 2012
I've created a custom MenuBar to make this happen. But it just doesn't seem to happen. It never renders any of the changes I made to the Graphics.What am I doing wrong?[code]
View 1 Replies
May 9, 2007
I'm trying to tile the background of a movieClip with a set of small squares, called grid. However, the script only attaches on instance of grid. I don't understand why this is. Below is my code exert:
[Code]...
View 1 Replies
Mar 20, 2010
How can I use multiple item renderers in mx:Tree depending on item's depth/level in tree?For example. For the first level items I want to use label with button and for second level items combobox
View 2 Replies
Mar 5, 2010
I have an item renderer that checks an external source for display information. If that information changes, I want to force all item renderer instances to check it.
What's the best way for force all the item renderers in a list or grid to either commitProperties or execute some other method?
I've read that resetting the grid.itemRenderer property will make them all initialize. I've also received the suggestion to iterate recursively through all the grid's children and call invalidateProperties on all the UIComponents I find.
View 2 Replies
Nov 25, 2010
Can i use creation complete in item renderers, i have a data grid and i have kept every single cell as an item renderer. is it a good practice to use creation complete here. I fear events might fire up at wrong instances.
View 2 Replies
Sep 27, 2009
I've got a client who has a list of items on a Datagrid. When the row is clicked, it sends the user to another page with details of that item. The client wants the rows to act like HTML links, where the color is purple when the link has been previously visited and its normal color if the row hasn't been clicked in the past. I've accomplished this with item renderers and SharedObjects. The application loads the visited ids into an array on start and the item renderer colors the individual cells if that row had been visited.
The issue here is that the client also wants the text color in the rows to turn white when the user rolls over the row. Because the item renderer sets the color, it doesn't respond to the default stylesheet for the datagrid. I can make it turn white on rollover of an individual cell, but we need the whole row to do it. Is there a way to trigger a function in all the item renderers in the row, or is there a better way to accomplish this?
View 1 Replies
Jan 24, 2011
I have data ItemRenderers with DataGroup, but I have many items, and it seems to me that DataGroup create all of them not only those few displayed on users screen, which takes time and resources.
View 1 Replies
Feb 23, 2011
I'm trying to have multiple item renderers in a list, as I have several different types of objects that I want to display. I tried creating a new class that extends ListBase, and adding override public function createItemRenderer with my code within this function. I then instantiate the new class and give it my array of data as its dataProvider, but createItemRenderer is never called within my new class,
View 2 Replies
Jun 14, 2011
while creating custom item renderers which interfaces we need to implement?
View 2 Replies
Aug 8, 2011
I have an item renderer for a list containing an image, label and a checkbox.These are visible depending on the dataProvider property of the list.E.g if an image is a premium image then display the premium label, if an image is a favourite then display a star etc.The problem is i have a massive if statement, and this doesn't seem good practice.
View 1 Replies
Feb 9, 2010
I have a List component using multiple item renderers determined by the itemRendererFunction. When I set the data the first time, it works as expected. Then, when I set the data a second time with new data, it doesn't call the itemRendererFunction and tries to reuse the current renderers even though they don't match the data.Once I scroll, the function is called and the correct renderers are used. I tried calling invalidateDisplayList and such prior to setting the data, but that didn't fix the problem.
View 3 Replies
Aug 24, 2010
I have created a custom multiline item renderer for mx:Tree component. Important to mention that my item renderer has two UITextFields in it. Sometimes (depends of the input data) only one of UITextFields must be shown, so when second UITextField is not needed I hide it and recalculate the height of my item renderer. According to my tests height is calculated properly.The problem occures when I do scroll of my tree. The error text is:
TypeError: Error #1010: A term is undefined and has no properties.
at mx.controls::List/adjustVerticalScrollPositionDownward()[E:dev4.0.0frameworksprojectsframeworksrcmxcontrolsList.as:1042]
[code].....
View 1 Replies
Feb 3, 2012
I'm currently working with the OLAPDataGrid component and got stuck at a relatively simple task: I want to style the last row of the grid differently from the rest, so my cell item renderer needs to know whether he's rendering the last row with content in the overall grid, including those rows currently not rendered because they are outside the visible grid space. AdvancedGridListData's rowIndex property only gets me the row index of the renderer relative to the range of visible grid rows, i.e. when I scroll down the grid, a data item with an index greater than 0 gets the rpw index = 0.
View 2 Replies
Oct 6, 2010
You can hook into the creation of Flex 4 item renderers easily enough (through itemRenderer, or itemRendererFunction) allowing you to pull renderers from a custom object pool, but how would you put those renderers back into the pool?
I understand that layout virtualization does a form of object pooling, but I'd like a way to hook in to that. For example, when an itemRendererFunction has been assigned to a data group with a virtualized layout, item renderer construction is indeed deferred, but the instances are not re-used - I'd like to be able to intervene there, if possible.
But even in the case of normal virtualized renderers (where the instances are re-cycled) it would still be useful to be able to manage the pool manually. Pools could be shared between data groups, for example, to reduce the initial buffer required to populate each group.
Is there any way to know when Flex discards an item renderer instance? I have a sinking feeling that there is just no reliable way to tell - even though perhaps there should be.
View 2 Replies
Feb 24, 2011
I have a view component called viewBase where I defined a advanced datagrid with few item renderers for datagrid columns. Now I have a requirement where I need to use the same view viewBase component, but not required to use any item renderers.
how to override the itemrenderers which are declared in a view component?
View 1 Replies
Mar 31, 2010
Whenever I add paddingRight to a column in the flex grid, it adds the padding to the header as well.Is anyone familiar with how I can add paddingRight just to the column and not to the header? Below is the column code where I was specifying the padding.
<mx:DataGridColumn width="60" headerText="Type" dataField="Grade" headerStyleName="headerLeft" textAlign="left" draggable="false" resizable="false" headerRenderer="GridHeaderRenderer" paddingRight="5"/>
View 1 Replies
Sep 24, 2009
I have a mx:Grid component in my flex application. But I would like to resize it by clicking and dragging in the border. This component doesn't allow doing that.I want to put a panel in each gridItem of this Grid component and resize it.
View 1 Replies
Mar 27, 2010
When i try to override the updateDisplayList to draw a backgroundImage for a tab navigator, the background does not fill till the end of the tab navigator. A space equal to the tab bar height does not get filled by the background. same is the case when I use an Image as backgroundImage. Any idea how to get this resolved?
View 2 Replies
Feb 22, 2012
[Code]...
why throwing "Call to possible undefined function updateDisplayList"?
View 1 Replies
Aug 6, 2011
I know there is a built-in update framework inside AIR but finding valid code samples for the latest versions proves to be hard. Some code for simple updating (assuming ActionScript 3,
View 1 Replies
Apr 12, 2010
I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.
var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);
Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.
If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...
signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????
View 3 Replies
May 28, 2011
I'm resizing a chart and want to take a picture of it when all the children of that chart are done updating.
For example I'm drawing some stuff on the chart after the size changes. I've tried chaining a bunch of callLater() but I'm still running into problems on slow computers.
Raising an event when the last children has executed doesn't seem to work as it might take a while to draw (hence the callLaters).
Is there a best practice to find out when something is done updating?
View 1 Replies
Oct 30, 2007
I am having issues with startDrag(). I have a movie clip called circle. Inside circle, I have a movie clip called circleFill and another called circleOutline.onEnterFrame, this movieClip is duplicated 4 times.
When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.
[Code]...
how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)
View 8 Replies
Oct 24, 2011
i have a box called infoBox that contains a text field called caption. infoBox expands on mouse-over. When it does so, I do not want the text in caption to scale up - I want it to stay at 11 pt. So far my code to prevent this from happening is not working:How do I fix this?[URL]..
View 2 Replies
Jan 28, 2011
My Combobox is not alway updating when I update the ArrayCollection.[code]...
the first time it updates the combobox fine and sometimes it works the 2nd, 3rd, etc time is might update the combo box. After it stops updating the combobox, it never does until I restart the app. I have verified that the ArrayCollection is updated via the debug data, it is just the combobox is not updating the display.
View 1 Replies