[Flashr] Problem with Group Class
Mario Klingemann
mario at quasimondo.com
Tue Jan 3 09:16:24 EST 2006
Kelvin Luck schrieb:
>Hi Mario,
>
>Thanks for the feedback :)
>
>Are you using the latest version of Flashr from svn? Because I think I
>ran into this problem myself a while ago and uploaded a fix for it (I
>should create a new release and re-generate the docs - sorry!).
>
>
Aha I see - I used your latest release, not the the svn version.
>Currently FlickrResponseListener.onGroupsPoolsGetPhotos is called with
>three arguments - group, photos and resultsSet. photos is an argument
>that I added when I ran into the problem you describe - from the
>comments above: "An array of the <Photo>s which have just been added
>to this <Group>s pool. (so that if you have done a different search
>within this <Group> you can tell which of the <Photo>s are new)".
>
>
Does that mean that then I have to loop through all results to tell the
new ones from the old ones? Hmmm, sounds a bit complicated to me. For my
purposes I just added this method to your group class:
/**
* Function: clearPool
* Empties the groups image pool.
*
**/
public function clearPool():Void
{
_pool = Array();
}
And before calling groupsPoolsGetPhotos I just clear the pool:
Group.getGroup("54718308 at N00").clearPool();
_flickr.groupsPoolsGetPhotos("54718308 at N00", "example");
>I'm still not really sure if this is an ideal solution but it seemed
>to work for my needs. I'm not sure if it is really useful to be
>keeping the Group._pool Array because I can't see how to confirm that
>it has all the Photos in or that they are in the right order - I'd be
>interested in your feedback on this...
>
>
I think the current behaviour is a bit unexpected, because it differs
from the results that flickr returns. On the other hand know that I know
what happens it could be useful for certain tasks. Just give me that
clearPool method ;-). Hmm, maybe a removePhotos( photos:Array ) method
could also be useful then.
Cheers
Mario
>Cheers,
>
>Kelvin.
>
>_______________________________________________
>Flashr mailing list
>Flashr at osflash.org
>http://osflash.org/mailman/listinfo/flashr_osflash.org
>
>
More information about the Flashr
mailing list