Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: gcd on September 25, 2015, 05:08:49 AM

Title: arraymaker remove event not working on Array List Remove At
Post by: gcd on September 25, 2015, 05:08:49 AM
i tried adding this on playmakerarraylistproxy.cs

Code: [Select]
// compose Remove so that we can broadcast events
// i tried copying the set event, but still its not triggering the event
    public bool Remove(int index, bool silent = false)
{

if (!silent)
{
                dispatchEvent(removeEvent, index, "int");
}
return true;

}
// this works only on Array List Remove
    public bool Remove(object value, string type, bool silent = false)
    {
        if (arrayList.Contains(value))
        {
            arrayList.Remove(value);
            if (!silent)
            {
                dispatchEvent(removeEvent, value, type);
            }
            return true;
        }

        return false;
    }

but I guess I did wrong lol,  also how come event feature is not available in hash table ?
Title: Re: arraymaker remove event not working on Array List Remove At
Post by: jeanfabre on September 25, 2015, 06:38:43 AM
Hi,

 This was tricky, because I started this feature sending on event per item deleted or edit, but then what would I be doing when deleting or adding a range... so I was a bit stuck to cover the whole set... and removeAt was certainly added later on and I forgot to plug it :)

Can you get bac to me next week, I'll update it and make it more consistent and plug it for hashtables too.

 Bye,

 Jean
Title: Re: arraymaker remove event not working on Array List Remove At
Post by: gcd on September 26, 2015, 01:42:29 AM
thanks Jean! you're the best ;]