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

    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.
    aljungberg committed Jun 16, 2013
  2. Cleanup: TableTest/Editing.

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

    … 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:`.
    aljungberg committed Jun 16, 2013
Commits on Jun 15, 2013
  1. Test: include an image in Copy and Paste test.

    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).
    aljungberg committed Jun 15, 2013
  2. Simplify copy and paste code path.

    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.
    aljungberg committed Jun 15, 2013
  3. Fixed: Safari "can't paste" code triggered even for a content editabl…

    …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.
    aljungberg committed Jun 15, 2013
  4. Fixed: paste in Firefox.

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

    …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).
    aljungberg committed Jun 14, 2013
  2. Test: new copy and paste manual test.

    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.
    aljungberg committed Jun 14, 2013
  3. New: native copy and paste support extended with copy and cut.

    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.
    aljungberg committed Jun 14, 2013
Commits on Jun 13, 2013
  1. Fixed: crash in - CPArray/CPDictionary description containing self re…

    …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.
    aljungberg committed Jun 13, 2013
  2. Fixed: crash on -CPArray/CPDictionary description if a value was the …

    …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.
    aljungberg committed Jun 13, 2013
  3. New: objj_getClassList().

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

    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.
    aljungberg committed Jun 12, 2013
  5. New: nib2cib support for runtime attributes of point, size, rect and …

    …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.
    aljungberg committed Jun 13, 2013
  6. New: KVC `setValue:forKey:` now automatically unwraps `CPValue`.

    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).
    aljungberg committed Jun 13, 2013
  7. Fixed: CGRectFromString made bad CGSizeFromString call.

    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.
    aljungberg committed Jun 13, 2013
Commits on Jun 12, 2013
  1. Fixed: Wrong initial values for _lineDashesPhase and _lineDashes in C…

    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.)
    primalmotion committed Jun 12, 2013
  2. Merge pull request #1943 from Dogild/EmptyTableView

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

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

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

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

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

    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.
    aljungberg committed Jun 12, 2013
  8. Formatting: semicolons.

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

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

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

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

    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.
    Dogild committed Jun 3, 2013
  2. capp_lint

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

    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
    Dogild committed Jun 3, 2013
Commits on Jun 1, 2013