playMaker

Author Topic: arraymaker remove event not working on Array List Remove At  (Read 1453 times)

gcd

  • Playmaker Newbie
  • *
  • Posts: 5
arraymaker remove event not working on Array List Remove At
« 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 ?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: arraymaker remove event not working on Array List Remove At
« Reply #1 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

gcd

  • Playmaker Newbie
  • *
  • Posts: 5
Re: arraymaker remove event not working on Array List Remove At
« Reply #2 on: September 26, 2015, 01:42:29 AM »
thanks Jean! you're the best ;]