Changeset [782f47a30bb281005d1e84fe6b7ab87dacfd5f6d] by Aparajita Fishman

January 9th, 2013 @ 01:02 AM

Key view loop fixes/improvements

  • Removed unnecessary code at beginning of CPTextField -becomeFirstResponder that might have been a hack to get around a bug I fixed.
  • Fixed race condition in setTimeout closure in CPTextField -becomeFirstResponder.
  • CPWindow -setInitialFirstResponder now works reliably and follows Cocoa behavior in that if -makeFirstResponder is called with something other than the window before the window is first shown, it will override the initial first responder.
  • Like Cocoa, until the first responder is set during window load, the first responder is the window by default, not the content view.
  • Optimized search for any view that has a previous/next key view set.
  • Sheets can become key windows again.
  • CPWindow -recalculateKeyViewLoop now just marks the loop as dirty, per Cocoa docs.
  • CPWindow -autorecalculatesKeyViewLoop now behaves per Cocoa, it only has an effect when views are added or removed.
  • If the first responder does not have a valid previous/next key view, it does not resign to nil, per Cocoa behavior.
  • Code optimization and cleanup.
  • Test app (KeyViewLoopTest) that demonstrates various scenarios.

Committed by Aparajita Fishman

  • A Tests/Manual/KeyViewLoopTest/AppController.j
  • A Tests/Manual/KeyViewLoopTest/Info.plist
  • A Tests/Manual/KeyViewLoopTest/Jakefile
  • A Tests/Manual/KeyViewLoopTest/KeyViewLoopTest.xcodeproj/project.pbxproj
  • A Tests/Manual/KeyViewLoopTest/KeyViewLoopTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  • A Tests/Manual/KeyViewLoopTest/Resources/MainMenu.cib
  • A Tests/Manual/KeyViewLoopTest/Resources/MainMenu.xib
  • A Tests/Manual/KeyViewLoopTest/Resources/spinner.gif
  • A Tests/Manual/KeyViewLoopTest/index-debug.html
  • A Tests/Manual/KeyViewLoopTest/index.html
  • A Tests/Manual/KeyViewLoopTest/main.j
  • M AppKit/CPApplication.j
  • M AppKit/CPTextField.j
  • M AppKit/CPView.j
  • M AppKit/CPWindow/CPWindow.j
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.

Shared Ticket Bins