Read the latest news on the Cappuccino reddit.

Cleaning up our GitHub Issues

May 28th, 2012

We’re very pleased to today announce our new Cappuccino Issue Reviewers. You might already have seen them cleaning up the issue backlog over at GitHub, sometimes closing already fixed bugs, sometimes tagging and structuring up languishing issues.

Our new reviewers are (in alphabetical order):

The issue reviewers will be helping the project tremendously with their diligence and volunteering of time, so we hope we speak for everyone in the Cappuccino project in saying: welcome!

- The Cappuccino Core Developer Team

Cappuccino News

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

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

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

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

Cappuccino Training Course: iDeveloper TV

October 19th, 2011

I’ve been a big fan of Cappuccino since late 2009 and have written and spoken about it pretty extensively. This past July I went to sunny Tetbury, UK to record a video course entitled “Cappuccino for Cocoa Developers.” Here’s some background on how the course came into being…

In addition to being a tony little country village where Prince Charles has one of his castles, Tetbury is famous for being the home town of iDeveloperTV, a company much loved by indie Mac and iOS developers for putting on NSConference, along with the extensive library of video courses and podcasts it has produced over the years. This past Spring, Steve “Scotty” Scotty invited me to give a presentation on Cappuccino at NSConference in the UK. It was extremely well-received, so I reprised the talk at the first CappCon in San Francisco this past Summer.

My goal for both talks was to show existing Cocoa developers how they can leverage their existing skills to craft desktop-caliber web-apps. In the course of preparing for these presentations, I ended up developing a series of carefully-designed tutorial apps, designed to feel comfortable to Cocoa developers while highlighting some web-specific architectural considerations.

These tutorial applications thus formed the basis of the 4 hour course. We shot the video against a white background so that the “talking-head” video could be mixed-in with the screen capture from my laptop as you see here:

The net effect is quite like having your own personal trainer. Scotty’s role is to make sure that I highlighted the points that may not be obvious to first-time learners.


The video is delivered in high-quality, DRM-free H.264 video that you download to your machine. Sync it to your iPad if you wish, then watch it in bed before dreaming of Cappuccino. The resolution lets you clearly read the code while listening to the discussion. Work along with the same source code shown in the video, adapt it to your needs, then build something meaningful to you. Since data persistence in web-apps is a major consideration, I’ve even included the source code for a simple RESTful Web Service written in Ruby on Rails so you can see how things work end-to-end.

I’m extremely proud of the work I did in creating this course, and I think Dave at iDeveloper TV did a bang-up job with the editing. Scotty has been kind enough to release the course at the exceptional price of US $29.99 in order to put in reach of everyone. Complete details can be found here:

http://ideveloper.tv/video/cappuccinocourse.html

I hope you enjoy the course. Feedback is greatly appreciated. Hopefully, I’ll have the chance to make some additional courseware in the future.

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.