Skip to content

Instantly share code, notes, and snippets.

View alexanderweiss's full-sized avatar

Alexander Weiss alexanderweiss

View GitHub Profile
@import <Foundation/CPObject.j>
@import <AppKit/CPOutlineView.j>
@implementation SourceListController : CPObject
{
CPOutlineView outlineView;
CPView owner;
CPDictionary items;
AOURLConnection dataConnection;
@import <Foundation/CPObject.j>
@import <AppKit/CPOutlineView.j>
@implementation SourceListController : CPObject
{
CPOutlineView outlineView;
CPView owner;
CPDictionary items;
AOURLConnection dataConnection;
id delegate;
- (id)outlineView:(CPOutlineView)outlineView objectValueForTableColumn:(CPTableColumn)tableColumn byItem:(id)item
{
CPLog("outlineView:%@ objectValueForTableColumn:%@ byItem:%@", outlineView, tableColumn, item);
var values = [items objectForKey:item];
var label = [values objectForKey:@"name"];
var fileName = [[CPString alloc] initWithFormat:@"%@_%@.png", [values objectForKey:@"basic_type"], [values objectForKey:@"extra_type"]];
return [[AOOutlineViewObjectData alloc] initWithLabel:label iconName:fileName];
}
- (id)outlineView:(CPOutlineView)outlineView objectValueForTableColumn:(CPTableColumn)tableColumn byItem:(id)item
{
CPLog("outlineView:%@ objectValueForTableColumn:%@ byItem:%@", outlineView, tableColumn, item);
var values = [items objectForKey:item];
var label = [values objectForKey:@"name"];
var fileName = [[CPString alloc] initWithFormat:@"%@_%@.png", [values objectForKey:@"basic_type"], [values objectForKey:@"extra_type"]];
return [[AOOutlineViewObjectData alloc] initWithLabel:label iconName:fileName];
}
@end
@import <Foundation/CPObject.j>
@import <AppKit/CPOutlineView.j>
@implementation SourceListController : CPObject
{
CPOutlineView outlineView;
CPView owner;
CPDictionary items;
AOURLConnection dataConnection;
@import <Foundation/CPObject.j>
@implementation AOUserPullDownButton : CPPopUpButton
{
CPMenuItem nameItem;
CPMenuItem loginItem;
CPMenuItem logoutItem;
CPMenuItem preferencesItem;
@import <Foundation/CPObject.j>
@implementation LoginWindowController : CPObject
{
@outlet CPTextField username;
@outlet CPTextField password;
@outlet CPWindow loginWindow;
CPCib loginWindowCib;
id delegate @accessors;