Changes Between Ver. 0.71 and the now merged jake loader branches

meelash edited this page Aug 12, 2010 · 4 revisions


This page will cover changes in implementation that have occurred between the previous release .71 and the soon to exist .8, the latest master, which has now been merged with the jake and loader branches.
The focus is on what needs to be modified to make existing code have the same results when run with the new frameworks, and best practices that have changed since the previous release. The details of changes in the source itself are only mentioned when they are relevant to understanding how implementation has changed.

If you see something inaccurate (high likelihood of this :)), or something that is a bug rather than a change, please correct.


The API for displaying loading progress has been modified. Previously, you defined a function element in index.html named window.update_progress which was called with the number of files that had so far been loaded.

Now, you define a function called OBJJ_PROGRESS_CALLBACK in your script before the Objective-J script tag. It should take three arguments, the loaded fraction (goes from 0 (just started loading) to 1 (finished loading)), the total size of the program (so you could show the amount of megabytes that have been loaded), and the last loaded bundle (presumably so you could display what bundles have been loaded).

In order for OBJJ_PROGRESS_CALLBACK to be called, your Info.plist has to have the total size of the application defined. One way to get this is to run press (see below) on your app which will add this value to the .plist automatically.


CPTableView has been completely rewritten since version .71.

A class called CPTableColumnHeaderView now exists in addition to CPTableHeaderView and contains a single instance variable, _textField, a CPTextField. Calling sizeToFit: sets the size of the CPTextField. Therefore, if you are automatically resizing your columns to the width of CPTableHeaderView as in this tutorial, you should now replace:
[column setWidth:[[column headerView] frame].size.width];
[column setWidth:[[[column headerView] textField] frame].size.width];


setWidth:forSegment: now adds the specified width of the segment to the frame width of CPSegmentedControl. So, previously if you initWithFrame: a CPSegmentedControl with width of 200 and then setWidth: of each of two segments to 100, you would get a CPSegmentedControl consisting of two segments, each 100 wide. Now, this would result in a CPSegmentedControl with width of 400, the first segment being 100 and the other the rest of the control.
So CPSegmentedControl should be initWithFrame: with a width of 0, and then add the segments and set them to the desired widths.

Deployment Tools


Press has seen some changes. One is that flatten is no longer an option for press, instead it is a separate tool that you can run on an already pressed application.
For syntax, type ‘press —help’ in terminal.


Flatten is now a separate tool from press.
For syntax, type ‘flatten —help’ in terminal.