Archive for the ‘Update’ Category

Cappuccino News

Tuesday, April 24th, 2012

New features

– Basic support has been added for NSDateFormatter in nib2cib.  (Alexander Ljungberg)

– Lazy support for bytes() and base64() added to CFData, +dataWithBytes and +dataWithBase64 methods added to CPData.  (cacaodev)

– capp_lint has been added to the Tools directory. capp_lint is a command-line tool to check code conformance with the Cappuccino style conventions. Anyone submitting pull requests should use capp_lint. Note that if you use the SublimeLinter plugin with Sublime Text 2, capp_lint is built in.  (Aparajita Fishman)

– Added missing CPSplitView -adjustSubviews method.  (Aparajita Fishman)

– Added a rhino-narwhal patch that can be applied to add JAVA_OPTS support when running Cappuccino utilities through rhino.  (Alexander Ljungberg)

 

Changes/Fixes

– CPURLRequest -init correctly initializes the object.  (Alexander Ljungberg)

– Fixed a crash when removing objects from an array controller which has its arrangedObjects.@count observed.  (Alexander Ljungberg)

– Fixed: a collection view wouldn’t become the first responder when its items were clicked.  (Alexander Ljungberg)

– Fixed CPScrollView trying to access subviews in -initWithCoder.  (Aparajita Fishman)

– Added an `xcode-select` warning to bootstrap.sh.  (Alexander Ljungberg)

– CPKeyedUnarchiver -decodeIntForKey, -decodeFloatForKey, and -decodeDoubleForKey now return 0 instead of nil, per Cocoa. (Aparajita Fishman)

 

Issues/Pull Requests

261 open issues

~180 left to triage

~20 closed in the last 8 days.

22 open pull requests

1 pull request closed in the last 8 days.

Cappuccino News

Tuesday, April 17th, 2012

If you have news about new projects in which Cappuccino is being used — internal or external — be sure to let everyone know!

Please pay special attention to the Fixes & Changes section, there may be changes that will affect your code.

 

New Features

– Two new methods have been added to CPView: registerThemeValues: and registerThemeValues:inherit:. These methods allow you to quickly configure the appearance of widgets using the same compact data format used in ThemeDescriptors.j, but at runtime. This is great when you need to customize your widgets but don’t want to go through the hassle of creating a new theme. For example:

ToolbarButtonHeight = 30.0;
ToolbarButtonThemeValues = [];

@implementation ToolbarButton : CPButton

+ (void)initialize
{
    var bezelColor = CPColorWithImages(
    [
        ["button-bezel-left.png", 2.0, ToolbarButtonHeight],
        ["button-bezel-center.png", 1.0, ToolbarButtonHeight],
        ["button-bezel-right.png", 2.0, ToolbarButtonHeight]
    ],
    CPColorPatternIsHorizontal),

    highlightedBezelColor = CPColorWithImages(
    [
        ["button-bezel-highlighted-left.png", 2.0, ToolbarButtonHeight],
        ["button-bezel-highlighted-center.png", 1.0, ToolbarButtonHeight],
        ["button-bezel-highlighted-right.png", 2.0, ToolbarButtonHeight]
    ],
    CPColorPatternIsHorizontal);

    ToolbarButtonThemeValues = [
        [@"font",               [CPFont systemFontOfSize:17.0], CPThemeStateBordered],
        [@"text-color",         [CPColor colorWithHexString:@"c7c8ca"]],
        [@"text-shadow-color",  [CPColor clearColor], CPThemeStateBordered],
        [@"text-shadow-color",  [CPColor clearColor], CPThemeStateBordered | CPThemeStateDisabled],
        [@"bezel-color",        bezelColor, CPThemeStateBordered],
        [@"bezel-color",        highlightedBezelColor, CPThemeStateBordered | CPThemeStateHighlighted],
        [@"min-size",           CGSizeMake(0.0, ToolbarButtonHeight)],
        [@"max-size",           CGSizeMake(-1.0, ToolbarButtonHeight)],
    ];
}

- (id)initWithFrame:(CGRect)aFrame
{
    self = [super initWithFrame:aFrame];

    if (self)
        [self registerThemeValues:ToolbarButtonThemeValues];

    return self;
}

@end

– The new Cocoa image scaling constant names have been added to CPControl.j:

New name                            Old name
CPImageScaleProportionallyDown      CPScaleProportionally
CPImageScaleAxesIndependently       CPScaleToFit;
CPImageScaleNone                    CPScaleNone;
CPImageScaleProportionallyUpOrDown  <not implemented>

The old names are supported but deprecated, so you should use the new names. Support for CPImageScaleProportionallyUpOrDown has been added as well (thanks Blair Duncan). There is a demo of image alignment and scaling in Tests/Manual/CPImageViewAlignmentScaling.

valuePath and valueURL bindings have been added for CPImageView. See Tests/Manual/CPImageViewbindingsTest for an example. (Thanks cocoadev)

– Added CPURL -URLByDeletingLastPathComponent and CFURL.createDeletingLastPathComponent.

– We implemented a documented issue life cycle and have started the long overdue process of triaging the hundreds of open tickets. We encourage everyone to take a look here before posting issues:

Posting issues

– Support for symlinks in a project has been added to XcodeCapp. (Thanks Richard van Zon)

 

Fixes & Changes

CPEvent -timestamp now returns the fractional number of seconds since startup, as documented in Cocoa. (Thanks cocoadev)

–  XcodeCapp ignores userland NS files (NS_*.j).

– When committing changes to an edited table cell, there was an infinite loop. This has been fixed.

–  jake will not stop if you don’t enter valid credentials when trying to install man pages for tools.

–  Previously, when a control set its value and there were bindings to the control, the value would eventually echo back. In the case of a text field, this would result in the selection changing. This has been fixed. (Thanks cocoadev)

– A bunch of unnecessary and unintended global variables have been removed. (Thanks Blair Duncan)

- Improvements/fixes have been made to the formatting of the log level and title in CPLog. The level will default if none is passed. If nil is passed, it is suppressed.

- When a text field became first responder, it would be focused and then selected in two separate Javascript timeouts. This caused a small flash in some browsers. The second timeout has been eliminated to eliminate the flash.

- CPTabView will not allow a tab to be selected if the delegate disallows it. (Thanks cocoadev)

- The binding collection operators @min, @max, @sum and @avg were rewritten, refactored and fixed to eliminate an infinite loop with empty collections. They now support full property key paths.

- When a text field resigns, it always sends CPControlTextDidEndEditingNotification, whether or not editing had begun. This is consistent with Cocoa.

 

Ticket/Pull Request Count

276 open issues.
~225 left to triage.
~36 closed in the last 10 days.
18 open pull requests.
27 pull requests merged or closed in the past 10 days.—

Cappuccino News

Tuesday, April 10th, 2012

What’s new in Cappuccino in the past two weeks:

– Some major new features have been added to nib2cib:

  • nib2cib now supports User Defined Runtime Attributes in Interface Builder.
  • nib2cib now supports userland NS classes. This is a huge new feature that allows you to add nib2cib support for your own classes without modifying nib2cib. Along with User Defined Runtime Attributes, you can now place and configure your own view classes in nib2cib!
  • nib2cib now supports file-based configuration options, which is important when you are using XcodeCapp.

See the nib2cib man page for more information on the new nib2cib features.

– If you ever looked at the DOM elements to figure out why your views are not laid out the way you want, this feature is for you. Put the following line in your index-debug.html <script> section where Objective-J is configured:

appkit_tag_dom_elements = true;

This will add an attribute called “data-cappuccino-view” to all DOM elements that are created by CPView (and subclasses). The value of the attribute is the class name. Great for debugging the view hierarchy!

– The functions CGInsetUnion and CGInsetDifference have been added.

– We now have small and mini progress indicator images for use with CPProgressIndicator.  (Thanks daboe01)

– Popovers have cool new animation and are a lot more robust.

– The capp ThemeDescriptor template has been enhanced to automatically symlink BlendKit so that you can run the theme showcase without any extra work.

– A new command line tool, dump_theme, has been added. You can use this to view a formatted dump of any theme. Use ‘man dump_theme’ for more info.

– Option/Alt-clicking on a disclosure toggle of a CPOutlineView will recursively expand the item and all of its children.  (Thanks Blair Duncan)

– Added CPURL -URLByDeletingLastPathComponent.

– Windows now automatically set up the key loop and if no view has been set as the initial first responder, sets the first key view as the initial first responder.

Cappuccino 0.9.5

Wednesday, November 16th, 2011

Today we are extremely excited to announce Cappuccino 0.9.5, featuring over 90 new features and improvements in addition to numerous bug fixes. Here are some of the new features we think you’ll really like.

Modern scrollbars

Cappuccino now features new scrollbars which fade away automatically when not in use, giving more space for the content of your scroll views. If the user’s browser does not support or use overlay scrollbars, Cappuccino automatically detects it and falls back to old style scrollbars.

Documentation Overhaul

The Cappuccino documentation has not only been extended but also visually refreshed. Many more classes and methods are now in the documentation and it’s an easier read.

Cappuccino 0.9.5 documentation screenshot.

Popover Widget

A popover control is a small window that appears to ‘come out’ of a part of your user interface, and which remains attached to it until the user dismisses it. It’s an easy way to ask for extra information when that ‘create’ button is clicked, or to show a list of individually selectable downloads when the ‘downloads’ button is clicked.

A CPPopover control.
CPPopover originating from a button.

Level Indicator Widget

A level indicator shows a discrete graduation from ‘empty’ to ‘full’, useful for certain gauges like space usage. Level indicators can also be editable and can be placed inline in table cells.

A series of four level indicators showing various colour coded levels.
Level indicators, some in a ‘warning’ state.

Predicate Editor

Predicates are powerful tools for encoding ‘search patterns’, and combined with the power of Cappuccino’s Array Controller class they make it incredibly easy to create user searchable tables or other views. The new predicate editor allows users to create their own saved searches with almost no work for the developer.

A user editable search combining various criteria.

Tooltips

A much requested feature has been tooltips. We didn’t want to release something that wasn’t as powerful and flexible as everything else in Cappuccino and we don’t think we will disappoint. Cappuccino tooltips can be attached to any control, position themselves intelligently and support multiline tips.

A yellow tooltip next to a Click Me button with multiple lines of text.

Stronger Interface Builder Integration

If you want to easily create and edit your user interfaces using a visual editor, you have the best tool in the market available for use with Cappuccino: Interface Builder. Every aspect of the nib2cib experience has improved, with better support for fonts, smarter realignment of widgets to match Cappuccino sizes and support for more controls than ever before. Best of all, the new XcodeCapp application automatically creates an Xcode project out of your Cappuccino project and lets you place UI components with ease.

XcodeCapp's menu.

New Installer

The new bootstrap installer is much simpler to use and installs all the packages you will need by default.

Cappuccino's bootstrap.sh running in a terminal window.
You know you want to.

Notable Improvements

There are too many improvements to list them all here but here are some highlights:

  • CPNumberFormatter with CPNumberFormatterDecimalStyle.
  • More powerful objjc CLI.
  • CPButton continuous mode.
  • Keyboard navigation, improved submenu handling and auto validation in CPMenus.
  • Support for pattern fills when drawing using CG.
  • Many new bindings features and optimisations, including CPNullPlaceholderBindingOption, CPContinuouslyUpdatesValueBindingOption and better object controllers.
  • CPUserDefaultsController which can be used to easily bind controls to user default keys in Interface Builder or elsewhere.
  • CPColorWithImages convenience function to quickly create a `CPColor` from single, 3-part or 9-part images.
  • Support for autosaving and collapsing views towards the right in CPSplitViews.

For the full list of changes, see the Cappuccino 0.9.5 change log.

The Team

We’re also happy to announce we’ve added Klaas Pieter AnnemaAparajita Fishman and Antoine Mercadal to the core team. Their contributions to Cappuccino have been invaluable.

- The Cappuccino Core Developer Team

Download Cappuccino

CappCon Tickets Now Available!

Tuesday, May 24th, 2011

CappCon 2011 is shaping up nicely with some great speakers including legendary indie developer Wolf Rentzsch, Pete LePage from Google, Jorn van Dijk of Sofa, and of course many others.

Tickets for CappCon are now available along with more details at http://cappcon.org

Also, be sure to tell your friends in person, on Twitter, and Facebook: we want to see the whole Cappuccino community there!

See you in June!

Cappuccino 0.9

Wednesday, February 23rd, 2011

We’re really excited to announce the next major release of Cappuccino, Version 0.9. This massive release includes several killer new components, exciting new features for existing components, and of course a number of bug fixes. Here’s a brief overview of some of the compelling things you’ll find in Cappuccino 0.9:

Bindings

One of the most exciting features of this release is full Key Value Bindings support. Team members Klaas PieterAlexanderRoss, and of course many members of the community have put a tremendous amount of work into getting bindings ready for this release. With support for most major components, CPObjectController, CPArrayController, and undo/redo, bindings are already a killer feature. But we’ve gone one step beyond that and included support for bindings in nib2cib! So not only can you build your Cappuccino interface in Interface Builder, but you can now configure interface bindings in it as well.

CPTableView and CPOutlineView

We were incredibly excited to introduce table views—one of the most important and versatile components in any widget set—in our 0.8 release. In 0.9, we’ve matured the table view to production quality and added its supplemental component, the outline view. CPOutlineView lets you build tables that provide hierarchical data and it inherits from CPTableView, so it already benefits from all the additional work that has gone into the table view.

 

CPOutlineView CPOutlineView

Table views now support bindings, group rows, inline editing, column reordering and resizing, and a whole slew of other features. Perhaps the most requested feature that is now supported: variable row heights.

 

CPTableView Variable Row Heights in CappuTweetie
CPTableView Variable Row Heights in an upcoming Cappuccino demo app

One of the most important aspects of our table view is performance; we have been very careful not to sacrifice speed for any of these new features. CPTableView will still scroll like butter, even with hundreds of thousands of rows.

New Components

This release also introduces several new features to Cappuccino. You’ll find more controls from Cocoa and some new additions specific to Cappuccino. While there are too many to mention them all here, here are some notable additions:

  • CPAlert: Totally rewritten for ease of use and featuring a new UI  designed by Sofa.
  • CPBrowser: We’re shipping a great implementation of CPBrowser with this release of Cappuccino. CPBrowser provides columnar layout for displaying hierarchical data. This is very similar to the column view in Mac OS X’s Finder.
  • CPCursor: A simple API for changing the user’s cursor. The class supports a number of cursors from the start or allows you to load your own images.
  • CPPredicate: The CPPredicate school of classes gives you a very powerful way to filter through your data. A future release may include robust controls for users to visually edit predicates.
  • CPStepper: A control that allows users to incrementally step through values.
  • CPTokenField: A powerful text field subclass with support for autocomplete, CPTokenField allows you to build unique token managers, like the address fields in Mac OS X’s Mail.app.
  • NativeHost: We announced NativeHost a few months ago, but this is the first time we’ve included it with a release of Cappuccino. NativeHost lets you build your Cappuccino application for desktop platforms and distribute it like any other desktop app. Support for Mac OS X is currently included, with Windows and Linux support coming soon.


CPAlert

The Future

We’re extremely proud of this release and all the time and work that has gone into it. We couldn’t have made it to this point this without all our contributors (67 and counting!), and a huge thank you goes out to everyone involved. The core team has grown considerably as well, now composed of 7 team members. We also want to thank everyone who has battle hardened this release through rigorous testing and feedback.

But what’s next? We have a ton of updates in the pipeline, and the master branch is already far ahead of 0.9. Cappuccino has been open source for over 2 years now, and it has been an amazing ride. The framework has vastly matured and a lot of people would have already slapped the 1.0 sticker on it. However, we’ve had a concrete goal of quality and completion in mind from the beginning, and can finally see the light at the end of the tunnel. Stay tuned in the upcoming weeks as we discuss our final roadmap toward Cappuccino 1.0!

-Randy

You can find a full list of changes here.

Download

Cappuccino and Objective-J are licensed under the LGPL. For more information, see our licensing page.

Copyright © 2009 - 280 North, Inc. Cappuccino and Objective-J are registered Trademarks of 280 North. Logo by Sofa. Hosting by Slicehost.