Skip to content

Instantly share code, notes, and snippets.

@implementation AppController : CPObject
{
CPSplitView verticalSplitter;
CPSplitView horizontalSplitter;
CPArray projects;
ProjectsController projectsController;
ProjectsView projectsView;
}
@import <Foundation/CPObject.j>
@implementation ProjectsView : CPView
{
CPTableView projectsTable;
CPArray projects;
}
- (id)initWithFrame:(CPRect)frame
{
self = [super initWithFrame:frame];
- (void)connection:(CPURLConnection) connection didReceiveData:(CPString)data
{
//This method is called when a connection receives a response. in a
//multi-part request, this method will (eventually) be called multiple times,
//once for each part in the response.
projects = JSON.parse(data);
[projectsTable reloadData];
}
@import <Foundation/CPObject.j>
@implementation ProjectsView : CPView
{
CPTableView projectsTable;
CPArray projects;
}
- (id)initWithFrame:(CPRect)frame
{
self = [super initWithFrame:frame];
@import <Foundation/CPObject.j>
@implementation ProjectsView : CPView
{
CPTableView projectsTable;
CPArray projects;
}
- (id)initWithFrame:(CPRect)frame
{
self = [super initWithFrame:frame];
var request = new CFHTTPRequest();
var searchURL;
switch (searchType)
{
case JTSearchTypeFulltext: searchURL = fulltextSearchURL;
break;
case JTSearchTypeFragment: searchURL = fragmentSearchURL;
@import <Foundation/CPObject.j>
@implementation ProjectsView : CPView
{
id _delegate;
CPScrollView scrollView;
CPTableView projectsTable;
CPArray projects;
}
var projectsTab = [[CPTabViewItem alloc] initWithIdentifier:@"projects"];
[projectsTab setLabel:@"Projects"];
[projectsTab setView:projectsView];
[tabsView addTabViewItem:projectsTab];
@import <Foundation/CPObject.j>
@import "ProjectsView.j"
@import "TasksView.j"
@implementation AppController : CPObject
{
ProjectsView projectsView;
TasksView tasksView;
CPTabView tabsView;
@import <Foundation/CPObject.j>
@import "ProjectsView.j"
@import "TasksView.j"
@implementation AppController : CPObject
{
ProjectsView projectsView;
TasksView tasksView;
CPTabView tabsView;