[flexcoders] Recalculating SummaryRow in a filtered AdvancedDataGrid

2010-04-23 Thread lachance.brian
Hi, group

Does anybody know how to force a SummaryRow to recalculate on a filtered 
dataProvider?

I have two SummaryRows that were assigned to a GroupingCollection, which was 
then passed to my AdvancedDataGrid. When setting my ADG's filterFunction, I 
refresh the dataprovider just fine (as an IHierarchicalCollectionView -- Flex 
seems to change the GroupingCollection to a HierarchicalCollectionView) and the 
function is properly applied. The only problem is that the SummaryRow's don't 
get recalculated.

Does anyone see anything inherently wrong with my approach?

It may be something like the SummaryRows are applied to the dataProvider, and 
not just the unfiltered elements, but I haven't been able to find anything 
indicating this and I'd rather not have to explicitly modify my dataProvider 
(to "remove" the unfiltered nodes) if possible.

Thanks much in advance!

Brian



[flexcoders] Re: ListEvent itemRenderer field null when parent is out of view

2009-07-01 Thread lachance.brian
Wow, it looks like I need to read the documentation a bit closer: the 
itemToItemRenderer method looks like a pretty-obvious candidate!

Thanks, Tim!

--- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
>
> 
> Here's another work-around Brian:
> 
> public function handleTreeItemChange(event:ListEvent):void
> {
>callLater(getItemRenderer);
> }
> 
> public function getItemRenderer():void
> {
>   debugTextArea.text = "ListEvent's itemRenderer: " +
> testTree.itemToItemRenderer(testTree.selectedItem);
> }
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "lachance.brian" 
> wrote:
> >
> > Hi, Tim,
> >
> > Thanks for the tip! I hadn't thought of that as a direct workaround
> > of sorts, but that does open the doors for another way to get it to
> > work, I think :)
> >
> > It's not-so-much accessing the data that's the problem with this bug
> > (which I probably should have explained), but rather some of the
> > fields of the itemRenderer--specifically, the depth field. I guess I
> > could, instead of relying on that field, just traverse the tree
> > upwards from the selectedItem and calculate the depth manually in the
> > "bug" case.
> >
> > Thanks again, Tim!
> > -Brian
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote:
> > >
> > >
> > > Hi Brian,
> > >
> > > Nice post. Yeah, that is wierd; looks like a bug. You can get around
> > > it for now, by looking at the data instead:
> > >
> > > public function handleTreeItemChange(event:ListEvent):void
> > > {
> > > debugTextArea.text = "ListEvent's selectedItem: " +
> > > testtree.selectedit...@label <mailto:testtree.selectedit...@label ;
> > > }
> > >
> > > -TH
> > >
> > > --- In flexcoders@yahoogroups.com, "lachance.brian"
> 
> > > wrote:
> > > >
> > > > Hi, Group!
> > > >
> > > > I'm having some trouble with the Tree component in the Flex
> framework:
> > > >
> > > > When browsing a Tree with an XML-based dataProvider, I seem to be
> > > > unable to retrieve the itemRenderer field of the ListEvent event
> that
> > > > gets fired when the selected item changes (ListEvent.CHANGE). The
> > > > itemRenderer field is expected to not be null, but, I'm apparently
> > > > expecting the wrong thing.
> > > >
> > > > Has anyone ever ran into this issue? I've searched the Adobe JIRA
> > > > system and Google (and this list!), and I've yet to find a helpful
> > > > result. There were some previous bugs in the bug repository, but
> they
> > > > were transferred over from an old system. I've submitted the
> request
> > > > for more information, so we'll see where that goes.
> > > >
> > > > An example MXML file follows below. To see the "bug", scroll down
> > > > through the XML list until the parent item is out of view. Then,
> > > > select one of the children currently in view and press the
> left-key
> > > > to try to go to the parent item. Notice that the itemRenderer is
> > > > null, and this is where my problem arises.
> > > >
> > > > Thank you in advance for any help you're able to provide!
> > > >
> > > > MXML file:
> > > > http://pastebin.com/fd4614a
> > > >
> > > > P.S. This is my first time posting on a newsgroup, so I hope that
> > > > the formatting and whatnot worked out in an acceptable way. I
> > > > apologize if that's not the case.
> > > >
> > >
> >
>




[flexcoders] Re: Navigating to a new child in a ViewStack - how to target the child being hidden?

2009-07-01 Thread lachance.brian
If you still want to use the change event (or if for some reason the 
hide event doesn't seem to work), I think you could also look at the 
oldIndex value of the event. From there you could call 
getChildByIndex on the ViewStack to get a reference.


--- In flexcoders@yahoogroups.com, "lanekelly5"  wrote:
>
> I'm putting together a prototype of an app and I have a ViewStack that is 
> being controlled by a button toolbar.  In each of these views there is a 
> video player.  What I need to do is to pause the video in the view that is 
> being hidden.  I see the change event triggered when I change views, but it 
> seems that the target reference passed in via the event parameter is the new 
> view.  Is there an easy way to get a reference to the view being hidden?  Or 
> is there a different event triggered (something like a deactivate) that I can 
> use to create a handler with a passed in reference to the departing view?
> 
> Thanks.
>




[flexcoders] Re: ListEvent itemRenderer field null when parent is out of view

2009-06-30 Thread lachance.brian
Hi, Tim,

Thanks for the tip! I hadn't thought of that as a direct workaround
of sorts, but that does open the doors for another way to get it to 
work, I think :)

It's not-so-much accessing the data that's the problem with this bug 
(which I probably should have explained), but rather some of the 
fields of the itemRenderer--specifically, the depth field. I guess I 
could, instead of relying on that field, just traverse the tree 
upwards from the selectedItem and calculate the depth manually in the 
"bug" case.

Thanks again, Tim!
-Brian



--- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
>
> 
> Hi Brian,
> 
> Nice post.  Yeah, that is wierd; looks like a bug.  You can get around
> it for now, by looking at the data instead:
> 
> public function handleTreeItemChange(event:ListEvent):void
> {
>   debugTextArea.text = "ListEvent's selectedItem: " +
> testtree.selectedit...@label <mailto:testtree.selectedit...@label> ;
> }
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "lachance.brian" 
> wrote:
> >
> > Hi, Group!
> >
> > I'm having some trouble with the Tree component in the Flex framework:
> >
> > When browsing a Tree with an XML-based dataProvider, I seem to be
> > unable to retrieve the itemRenderer field of the ListEvent event that
> > gets fired when the selected item changes (ListEvent.CHANGE). The
> > itemRenderer field is expected to not be null, but, I'm apparently
> > expecting the wrong thing.
> >
> > Has anyone ever ran into this issue? I've searched the Adobe JIRA
> > system and Google (and this list!), and I've yet to find a helpful
> > result. There were some previous bugs in the bug repository, but they
> > were transferred over from an old system. I've submitted the request
> > for more information, so we'll see where that goes.
> >
> > An example MXML file follows below. To see the "bug", scroll down
> > through the XML list until the parent item is out of view. Then,
> > select one of the children currently in view and press the left-key
> > to try to go to the parent item. Notice that the itemRenderer is
> > null, and this is where my problem arises.
> >
> > Thank you in advance for any help you're able to provide!
> >
> > MXML file:
> > http://pastebin.com/fd4614a
> >
> > P.S. This is my first time posting on a newsgroup, so I hope that
> > the formatting and whatnot worked out in an acceptable way. I
> > apologize if that's not the case.
> >
>




[flexcoders] ListEvent itemRenderer field null when parent is out of view

2009-06-29 Thread lachance.brian
Hi, Group!

I'm having some trouble with the Tree component in the Flex framework:

When browsing a Tree with an XML-based dataProvider, I seem to be
unable to retrieve the itemRenderer field of the ListEvent event that
gets fired when the selected item changes (ListEvent.CHANGE). The
itemRenderer field is expected to not be null, but, I'm apparently
expecting the wrong thing.

Has anyone ever ran into this issue? I've searched the Adobe JIRA
system and Google (and this list!), and I've yet to find a helpful 
result. There were some previous bugs in the bug repository, but they 
were transferred over from an old system. I've submitted the request 
for more information, so we'll see where that goes.

An example MXML file follows below. To see the "bug", scroll down 
through the XML list until the parent item is out of view. Then, 
select one of the children currently in view and press the left-key 
to try to go to the parent item. Notice that the itemRenderer is 
null, and this is where my problem arises.

Thank you in advance for any help you're able to provide!

MXML file:
http://pastebin.com/fd4614a

P.S. This is my first time posting on a newsgroup, so I hope that
the formatting and whatnot worked out in an acceptable way. I
apologize if that's not the case.