@chriswa: Yes, this is the logic I was purposing. I suggested a typed attribute instead of UserData to avoid the typecast and to make it more explicit for folks using it. My thought is if that is the common way (seems like pretty standard event dispatch logic) to handle why not just give it to folks out of the box. Sounds like there may be enough folks who want to do something different to not make it useful. Perhaps that could be the standard impl that folks could "replace" by assigning their own global contact listener if they didn't want it?
@ewjordan: I definitely like the ingenuity behind this 🙂 Looks to be a bit much for my current app though. But something to keep in mind down the road.
That being said, I realize I'm out gunned by several veterans here so I know when to quit (I think). An article on contact listeners is a good idea. While I didn't plan to do the "iterate over the shapes" approach going forward, I could see where a lot of newer folks would, at least at first until they come to their senses. Doc should help.
@ewjordan: I definitely like the ingenuity behind this 🙂 Looks to be a bit much for my current app though. But something to keep in mind down the road.
That being said, I realize I'm out gunned by several veterans here so I know when to quit (I think). An article on contact listeners is a good idea. While I didn't plan to do the "iterate over the shapes" approach going forward, I could see where a lot of newer folks would, at least at first until they come to their senses. Doc should help.