-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Tactile with UIControl works inconsistently #1
Comments
Hi @pteasima, Thank you very much for the feedback. I'm using Your are absolutely right about the problem of the I pushed a new branch https://github.com/delba/Tactile/tree/map-table that fixes it. I tested it thoughtfully and it seems to work. I would love to have your feedback before merging it in master. You can install it like this:
Even though it isn't mentioned in the documentation, I observed that Thanks again 😄 |
Hi, sorry for taking so long. The change you made seems to make sense, however I dont have time to properly test it. Still, it feels like using a global hash table is not the ideal solution from a design perspective (storing object specific data in a global collection). Is there a reason why you chose not to use associated objects? I liked you solution for its simple swift syntax, but other than that its nothing new, there have been similar solutions using associated objects since objc. |
No problem @pteasima ! I merged the Thanks for the feedback! |
This is the one I had in mind, see addEventHandler: forControlEvents: method It doesnt allow unregistering the eventHandler (your off method), I dont think that should be a problem to implement but I dont wanna think about it right now. |
Thanks, I'll definitely take a look a it! |
I like the concept very much, unfortunately Tactile isnt reliable. When using it as so:
it only works about 95% of the time for me and my colleagues on different projects.
I had a quick look and would like to point you to this piece of code:
You are using a weakToStrongObjectsMapTable(), which has the property that: "Use of weak-to-strong map tables is not recommended. The strong values for weak keys which get zeroed out continue to be maintained until the map table resizes itself."
I think that the key
"\(control, event.rawValue)"
goes out of scope immediately, then, whenever the mapTable is resized, the values are released and stop working.Also suspicious to me is the cycle Actor<--owns-->Proxy.
Can you please take a look at this and explain? Thanks
The text was updated successfully, but these errors were encountered: