The _Assign method only fires when property is changed. Adding items to collection doesn't change its reference stored in the property .oTabs. You can create a subclass of Collection with overriten Add method.
CLEAR
o = CREATEOBJECT("MyCollection")
= o.Add("Apple")
= o.Add("Orange")
= o.Add("Banana",,2)
? o.Item(1)
? o.Item(2)
? o.Item(3)
RETURN
DEFINE CLASS mycollection as Collection
FUNCTION Add(eItem, cKey, eBeforere, eAfter)
? "Added " + eItem
ENDFUNC
ENDDEFINE
>I want to trap when the code adds an object to a collection.
>
>I have a property, 'oTab's, which has an assign method. In the Init I have:
>
>
>.oTabs = CREATEOBJECT("Collection")
>
>
>The _Assign method only fires when this line of code fires, not when
>items are added to the collection.
>
>Any way to do this?
--sb--