A Hypothetical Responder Chain Written in Swift: http://inessential.com/2016/05/15/a_hypothetical_responder_chain_written_i …
-
-
@jckarter Ditch the responder chain as a pattern! It’s stringly-typed programming and a tree traversal, we can do better (Elm, for one) -
@CodaFi_ String typing doesn't seem inherent to the problem to me. The tree traversal is a reasonable model of focus in WIMP envs though - View other replies
-
@jckarter It is relevant to runtime bloat of resp chain. Worst case (misspelled selector) O(~2n) messaging cost for NOTHING. -
@CodaFi_ How does Elm Arch handle focus? Unhandled events falling back to superview/window? - View other replies
-
@jckarter NSWindow wants in, NSWindow needs to sub to the mailbox. Events come from CG only as far as I am concerned. -
@CodaFi_ Well part of the cocoa magic is that all just works, and works uniformly across apps. If dev has to do work , they won't do it - View other replies
-
@jckarter I would be interested to know, e.g. How many XIBs have a selector wired to “first responder” vs a VC, etc. - View other replies
-
@CodaFi_ Probably more common on the desktop, where focus is more prominent and you have fixtures like the menu bar and key shortcuts - Show more
-
-
-
@jckarter@brentsimmons That's not really a tenable solution… - View other replies
-
@grynspan@brentsimmons Another formulation: responder methods return whether they were handled, with default imps returning false.
-
-
-
@jckarter@brentsimmons I had a quick go at implementing a simple responder chain http://www.fatgrin.com/articles/swift-responder-chain.html … - View other replies
-
@ryang_uk@jckarter@brentsimmons Wow, so all this fuss around lack of performSelector in Swift is just about laziness to use protocols? - View other replies
-
-
@jckarter@brentsimmons Could use enums for each type of command:https://gist.github.com/BurntCaramel/fa36f3737fcfae0703c5df7c7831ed8f …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Brent Simmons
Joe Groff
Kan We Box It?
Jonathan Grynspan
Ryan Gibson
Ölbaum
Patrick Smith