Re: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes
Thanks Alex, very much appreciated! -Greg On Sun, Nov 15, 2009 at 2:35 AM, Alex Harui aha...@adobe.com wrote: Pretty good for the first two, for updateDisplayList, you update any visuals, including changing colors, alpha. In theory you can change a style if the style would only call invalidateDisplayList() since that is blocked since you’re inside updateDisplayList. Putting a trace statement in updateDisplayList will tell you. You may need to override styleChanged to control which invalidation calls get made. 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 *Greg Hess *Sent:* Saturday, November 14, 2009 5:06 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes Thanks Alex, This week I have been trying to optimize some of my item renderers and have been following your examples from the closet. I have many IR's that have layouts 3 box's deep with view stacks to boot... Most of my IR's do custum selection indicators( border around thumbnails ect..) and these IR's are setting styles in creationComplete, show, and on ListEvent change and DataEvent change and I am trying to make it more efficient by following the component life cycle. Do you have a basic rule of thumb as to what you do in each faze like(this is my current understanding): commitProperties: update all display objects representing the model(data), I also have been trying(works with DataGrid) to perform custom selection indicators here(didnt work with TileList) measure: provide current measurement of all children updateDisplayList: just position children, can styles be changed here without forcing back through the cycle? Thanks for your help, Greg On Sat, Nov 14, 2009 at 1:08 AM, Alex Harui aha...@adobe.com wrote: BTW, updateDisplayList should get called 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 *droponrcll *Sent:* Friday, November 13, 2009 9:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, I have a custom item renderer in one of my TileList's. I need to set a style of one of the children to indicate selection, I am doing this by overriding commitProperties. However, when debugging the IR's commitProperties does not get called after the selection changes. I'm pretty sure that the styleFunction on the TileList_withStyle at flexdiary.blogspot.com gets called when the selectedItem changes. IMO, it's much cleaner not to have the itemRenderer making decisions about style. HTH; Amy
Re: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes
Thanks Alex, This week I have been trying to optimize some of my item renderers and have been following your examples from the closet. I have many IR's that have layouts 3 box's deep with view stacks to boot... Most of my IR's do custum selection indicators( border around thumbnails ect..) and these IR's are setting styles in creationComplete, show, and on ListEvent change and DataEvent change and I am trying to make it more efficient by following the component life cycle. Do you have a basic rule of thumb as to what you do in each faze like(this is my current understanding): commitProperties: update all display objects representing the model(data), I also have been trying(works with DataGrid) to perform custom selection indicators here(didnt work with TileList) measure: provide current measurement of all children updateDisplayList: just position children, can styles be changed here without forcing back through the cycle? Thanks for your help, Greg On Sat, Nov 14, 2009 at 1:08 AM, Alex Harui aha...@adobe.com wrote: BTW, updateDisplayList should get called 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 *droponrcll *Sent:* Friday, November 13, 2009 9:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, I have a custom item renderer in one of my TileList's. I need to set a style of one of the children to indicate selection, I am doing this by overriding commitProperties. However, when debugging the IR's commitProperties does not get called after the selection changes. I'm pretty sure that the styleFunction on the TileList_withStyle at flexdiary.blogspot.com gets called when the selectedItem changes. IMO, it's much cleaner not to have the itemRenderer making decisions about style. HTH; Amy
RE: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes
Pretty good for the first two, for updateDisplayList, you update any visuals, including changing colors, alpha. In theory you can change a style if the style would only call invalidateDisplayList() since that is blocked since you're inside updateDisplayList. Putting a trace statement in updateDisplayList will tell you. You may need to override styleChanged to control which invalidation calls get made. 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 Greg Hess Sent: Saturday, November 14, 2009 5:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes Thanks Alex, This week I have been trying to optimize some of my item renderers and have been following your examples from the closet. I have many IR's that have layouts 3 box's deep with view stacks to boot... Most of my IR's do custum selection indicators( border around thumbnails ect..) and these IR's are setting styles in creationComplete, show, and on ListEvent change and DataEvent change and I am trying to make it more efficient by following the component life cycle. Do you have a basic rule of thumb as to what you do in each faze like(this is my current understanding): commitProperties: update all display objects representing the model(data), I also have been trying(works with DataGrid) to perform custom selection indicators here(didnt work with TileList) measure: provide current measurement of all children updateDisplayList: just position children, can styles be changed here without forcing back through the cycle? Thanks for your help, Greg On Sat, Nov 14, 2009 at 1:08 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: BTW, updateDisplayList should get called 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 droponrcll Sent: Friday, November 13, 2009 9:44 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, I have a custom item renderer in one of my TileList's. I need to set a style of one of the children to indicate selection, I am doing this by overriding commitProperties. However, when debugging the IR's commitProperties does not get called after the selection changes. I'm pretty sure that the styleFunction on the TileList_withStyle at flexdiary.blogspot.comhttp://flexdiary.blogspot.com/ gets called when the selectedItem changes. IMO, it's much cleaner not to have the itemRenderer making decisions about style. HTH; Amy
[flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes
--- In flexcoders@yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, I have a custom item renderer in one of my TileList's. I need to set a style of one of the children to indicate selection, I am doing this by overriding commitProperties. However, when debugging the IR's commitProperties does not get called after the selection changes. I'm pretty sure that the styleFunction on the TileList_withStyle at flexdiary.blogspot.com gets called when the selectedItem changes. IMO, it's much cleaner not to have the itemRenderer making decisions about style. HTH; Amy
RE: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes
BTW, updateDisplayList should get called 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 droponrcll Sent: Friday, November 13, 2009 9:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: TileList custom ItemRenderer - commitProperties not called when selection changes --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Greg Hess flexeff...@... wrote: Hi All, I have a custom item renderer in one of my TileList's. I need to set a style of one of the children to indicate selection, I am doing this by overriding commitProperties. However, when debugging the IR's commitProperties does not get called after the selection changes. I'm pretty sure that the styleFunction on the TileList_withStyle at flexdiary.blogspot.com gets called when the selectedItem changes. IMO, it's much cleaner not to have the itemRenderer making decisions about style. HTH; Amy