Commits on Jun 16, 2013
  1. Refactor, restructure and simplify copy and paste handling.

    aljungberg committed Jun 16, 2013
    This change brings nearly all copy and paste related into a single, self-contained class. This new class is still somewhat coupled to CPPlatformWindow+DOM.j in the sense that it's highly specific and meant to be called in a very specialised way. Despite this, it's still a significant decoupling and the new code is more readable and easier to follow.
  2. Cleanup: TableTest/Editing.

    aljungberg committed Jun 16, 2013
  3. Fixed: menu items becoming permanently disabled, breaking e.g. Select…

    aljungberg committed Jun 16, 2013
    … All.
    Without this fix, if a menu item was disabled it could only be automatically re-enabled if the menu item had a `validateMenuItem:` or `validateUserInterfaceItem:` enabled target.
    This meant that for example if the Edit > Select All menu item was validated when the first responder was something like a collection view, it'd become disabled. If then the first responder was changed to a text field and revalidation occurred, the menu item would not become enabled and Select All would not be possible in the text field neither through the Edit menu nor the Cmd-A/Ctrl-A keyboard equivalent.
    This fix ensures that menu item validation does not only take negative action (disabling enabled items which should be disabled), but also positive action (enabling disabled items which should be enabled), even when there's no `validateMenuItem:` or `validateUserInterfaceItem:`.
Commits on Jun 15, 2013
  1. Test: include an image in Copy and Paste test.

    aljungberg committed Jun 15, 2013
    Image copy and paste to and from the system clipboard is not available in Cappuccino today. However, the image in the collection view can be used to test internal Cappuccino copy and paste (using Edit > Copy, Edit > Paste from the Cappuccino menu).
  2. Simplify copy and paste code path.

    aljungberg committed Jun 15, 2013
    This change begins to clean up the control flow of copy and paste. Before, copy and paste was dealt with partly in CPPlatformWindow, partly in CPApp and partly in CPTextField.
    Now, CPApplication has been removed from the path, simplifying it down to the two more expected actors.
  3. Fixed: Safari "can't paste" code triggered even for a content editabl…

    aljungberg committed Jun 15, 2013
    …e target.
    These targets might be rare but could occur in some Cappuccino text editor widget, in which case our standard native paste handling from Safari should work fine.
  4. Fixed: paste in Firefox.

    aljungberg committed Jun 15, 2013
    The paste into input field hack requires that we don't stop the Cmd-V/Ctrl-V keydown propagation.
Commits on Jun 14, 2013
  1. Fixed: copying from a CPTextField would not actually but the string v…

    aljungberg committed Jun 14, 2013
    …alue in the Cappuccino pasteboard.
    Without this fix, when text was copied from a CPTextField, the value would be copied into the system clipboard (if possible), but not into the Cappuccino pasteboard. This meant that the text could not be pasted back in Cappuccino using e.g. Edit > Paste from the Cappuccino menu.
    This fix ensures the appropriate text is copied both into Cappuccino's pasteboard and the system clipboard (when possible).
  2. Test: new copy and paste manual test.

    aljungberg committed Jun 14, 2013
    This test makes it easy to test copy and paste both inside a Cappuccino app, and externally to and from other Cappuccino instances in other browser, or other applications, when using a text field or a collection view as the source/destination.
  3. New: native copy and paste support extended with copy and cut.

    aljungberg committed Jun 14, 2013
    This fix switches to full native copy and paste in browsers which support it. This allows copy from anywhere - a collection view, a table view and so on - without the browser greying out the copy menu or beeping.
    In the future this can easily be extended to copy and paste images as well.
    This change also improves Safari paste support. In recent versions of Safari, pasting from the system clipboard into Cappuccino has been impossible. This remains impossible due to the lack of beforepaste events, but now the code cleanly switches to a Cappuccino-only paste at least.
Commits on Jun 13, 2013
  1. Fixed: crash in - CPArray/CPDictionary description containing self re…

    aljungberg committed Jun 13, 2013
    …ferential JS object.
    Without this fix, certain JS contents could cause `- CPDictionary description` and `- CPArray description` to crash.
    This change limits how deeply the description code will recurse before returning a default "…" description.
  2. Fixed: crash on -CPArray/CPDictionary description if a value was the …

    aljungberg committed Jun 13, 2013
    …window object.
    Without this fix, code like `[@{ "a": window } description]` would crash with a "Maximum call stack size exceeded" exception.
    Now`CPDescriptionOfObject()` function simply describes the window object as `window` rather than trying to serialise it into a huge description string.
  3. New: objj_getClassList().

    aljungberg committed Jun 13, 2013
    This function obtains the list of registered classes at the time its called.
  4. New: JavaScript clipboard API support for pasting.

    aljungberg committed Jun 12, 2013
    Without this feature, attempts to paste data into a Cappuccino app (outside of a text field) are handled by redirecting the paste into a hidden text field. Then a paste event is generated from whatever is captured in this field after a 0 timeout. This method is prone to timing related bugs where the paste event actually has an empty clipboard.
    With this new feature we read the paste data directly from the browser's native paste event when the browser supports it (Chrome 10+, Safari 5+, Firefox 22+). This is much more dependable and may in the future also enable us to read other types of paste data such as images.
  5. New: nib2cib support for runtime attributes of point, size, rect and …

    aljungberg committed Jun 13, 2013
    …range types.
    This change adds nib2cib support for `NSValue` when the value represents a NSPoint, NSSize, NSRect or an NSRange, which enables user defined runtime attributes of these types to be set in Xcode and then properly decoded in a Cappuccino app.
  6. New: KVC `setValue:forKey:` now automatically unwraps `CPValue`.

    aljungberg committed Jun 13, 2013
    This corresponds to the same KVC behaviour in Cocoa and is key when decoding cibs with certain properties set to struct values (such as NSSize).
  7. Fixed: CGRectFromString made bad CGSizeFromString call.

    aljungberg committed Jun 13, 2013
    Without this fix, CGRectFromString would call CGSizeFromString with a value like "{1, 2}}" (not the extra trailing "}"). Although CGSizeFromString didn't complain, it wasn't correct either.
Commits on Jun 12, 2013
  1. Fixed: Wrong initial values for _lineDashesPhase and _lineDashes in C…

    primalmotion committed Jun 12, 2013
    Firefox is not accepting the initial values for these two attributes, making it crash with an ILLEGAL VALUE error in any application using CPBezierPath (especially ones with CPPredicateEditor that is using bezier path to draw the selection arrows.)
  2. Merge pull request #1943 from Dogild/EmptyTableView

    aljungberg committed Jun 12, 2013
    Fixed: selection in a tableView without column
  3. Merge pull request #1940 from krodelin/udos-Resources-Directory-in-Fr…

    aljungberg committed Jun 12, 2013
    New: Added "Resources" directory to capp Framework template
  4. Merge pull request #1939 from Dogild/RemovedColumn

    aljungberg committed Jun 12, 2013
    Fixed: removeTableColumn does not removes column from tableColumns array
  5. Merge pull request #1938 from ahankinson/fix-collectionview-shiftselect

    aljungberg committed Jun 12, 2013
    Fixed: CPCollectionView range bounds exception if shift key was held for...
  6. Merge pull request #1898 from ahankinson/fix-issue1396

    aljungberg committed Jun 12, 2013
    Fixed: CPTokenField sends focus and blur notifications
  7. New: automatically fix ulimit when possible.

    aljungberg committed Jun 12, 2013
    Without this fix, trying to build Cappuccino or run a jake script with a too low `ulimit -n` would cause a fatal error.
    This change will automatically increase the ulimit when possible and only error out when it's not. The automatic change does not permanently affect the terminal session as it only targets the soft limit.
  8. Formatting: semicolons.

    aljungberg committed Jun 12, 2013
  9. Fixed: remove non-standard CPDocument API "firstEligibleExistingWindo…

    aljungberg committed Jun 12, 2013
    This method did not actually do anything, and was not part of the expected CPDocument API.
    Refs #1870.
  10. Formatting: whitespace.

    aljungberg committed Jun 12, 2013
    Refs #1870.
  11. Merge pull request #1870 from BlairDuncan/documentControllerCurrentDo…

    aljungberg committed Jun 12, 2013
    Fixed CPDocumentController missing method currentDocument
Commits on Jun 3, 2013
  1. Fixed: selection in a tableView without column

    Dogild committed Jun 3, 2013
    Previously it was possible to select rows in a CPTableView even if there wasn't columns. It was also possible to make a drag/drop.
    This PR fixes theses both problems.
  2. capp_lint

    Dogild committed Jun 3, 2013
  3. Fixed: CPTableView Drag and drop in void causes a crash

    Dogild committed Jun 3, 2013
    Previously the drag and drop and multiple selection from a void cells caused an exception.
    With this fix, you can start a drag/drop and a multiple selection from a empty row.
    Fixes #1857
Commits on Jun 1, 2013