sst89 / as3flickrlib

Automatically exported from code.google.com/p/as3flickrlib
0 stars 0 forks source link

Return from getPublicGroups not mapping to PagedGroupList properly #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
This is the code that should reproduce it -

// Get the user group list 
private function onGetdoGroups(event:Event):void
{
   service.addEventListener( 
FlickrResultEvent.PEOPLE_GET_PUBLIC_GROUPS,onPeopleGetPublicGroups);
   service.people.getPublicGroups( "53628484@N00" );
}

private function onPeopleGetPublicGroups(event:FlickrResultEvent):void
{
    if ( event.success ) {
        if (event.data.groups is PagedGroupList)  {
            TextDsp.text = "Flickr userid groups was found and paged group is fine  - "
            var list:PagedGroupList = PagedGroupList(event.data.groups);
            for each ( var p:Group in list.groups ) { 
                TextDsp.text = TextDsp.text + p.name + " - \n";
            }

        } else {
            TextDsp.text = "Flickr userid groups was found but not paged group returned ????  
- " + ObjectUtil.toString( event.data ) + "\n";
            for each ( var p:Group in event.data.groups ) { 
                TextDsp.text = TextDsp.text + p.name + " - \n";
            }
        }
    } else {
        Alert.show("Flickr userid groups not found.");
    }
}

What is the expected output? What do you see instead?

The event.data.groups should match a PagedGroupList.  however, it doesnot and 
instead shows 
as array. I can take the array and see that it contains elements of group, plus 
can traverse this 
looping through each elemenst as a Group.

What version of the product are you using? On what operating system?

I am runnign on osx.  took teh source from the svn to have the latest.

Please provide any additional information below.

Cant think of any :) 

Original issue reported on code.google.com by gestre...@gmail.com on 11 Jan 2009 at 6:28