I'm looking at doing this to prevent drag from datagrid into a" 
favourites" panel if the user already has that item in favs.

Drag from data gird, the panel that may receive the drop does a check of 
the "favourites" arraycollection  via

"*model.favourites,getItemIndex(theItemImDragging)*"

and if returns *-1* accepts the drop otherwise no go.

The arraycollection of favourites and the arraycollection in the grid's 
dataProvider are both just arraycollections of my own WineVO.

Docs say that getItemAt returns -1 if the obj is not in the 
ArrayCollection and mentions an "exact match".

My question is "does this exact match take into account the 
"mx_internal_uid" that flex carries around in each item in an 
arraycollection?
I'm  guessing it does because when I drag a "new" item into my panel I 
accept the drop and then if i try to repeat I get no drop, as I want.

If however I  do another search, returning the same finds but now in a 
re - sourced arraycollection with diff internal_uid's and try to drop 
them it allows the drop to happen and I get duplicates in my favourites.

I'm seeing that the only difference is the "mx_internal_uid" is 
obviously different in the datagrids arraycollection dataprovider.

Any way of handling this, or doing it differently

wayne mcfetridge
-- 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to