       # is the window, which doesn't give us any class information. We have to
       # walk up the call chain of callers to find which class we're actually
       # instantiating.
+      #
+      # NB: The expected value of "this" at this point is "window". However, due
+      # to a bizarre bug in IE8, when a Control() constructor is invoked during
+      # a jQuery ready() handler, "this" will *a* window but not *the* window.
+      # The code below does not currently depend on the value of "this", but
+      # for future reference, keep this mind.
       classFn = arguments.callee
 
       # See if we were invoked by the constructor of a subclass.

  ( selector, context ) ->

    # Figure out which class is being instantiated.
    # The first check we make is to see whether "this" is the window. The simple
    # check would be "this is window". However, due to a bizarre bug in IE8,
    # when a Control() constructor is invoked during a jQuery ready() handler,
    # "this" will *a* window but not *the* window, and the window check fails.
    # An acceptable workaround for IE8 is to see whether "this" is an instance
    # of Window. In normal browsers, the behavior of these two checks should be
    # the same.
    if !( @ instanceof Window )
      # Simple case, but also unfortunately rare. The constructor was invoked
      # in response to a "new Foo()" call on the control class Foo.
      classFn = @constructor
    else

        # This function was invoked by the constructor of a subclass created by
        # CoffeeScript. That constructor, in all likelihood, is the default
        # constructor generated by CoffeeScript (as QuickUI controls don't do
        # real work in their constructor; they use initialize() instead). So,
        # pop up one level in the call tree, then check *that* class to see
        # whether it's a CoffeeScript sub-subclass.
        classFn = classFn.caller

    # Ensure the class has been treated to be jQuery- and QuickUI-compatible.
