Skip to content

Instantly share code, notes, and snippets.

View orlaqp's full-sized avatar

Orlando Quero orlaqp

View GitHub Profile
var myApp = [CPApplication sharedApplication],
myMenu = [myApp mainMenu];
// Cloud Books
var cloudBooksMenu = [[CPMenu alloc] initWithTitle:@"Cloud Books"],
cloudBooksMenuItem = [[CPMenuItem alloc] initWithTitle:@"Cloud Books" action:nil keyEquivalent:nil];
var backupMenuItem = [[CPMenuItem alloc] initWithTitle:@"Backup" action:@selector(backup:) keyEquivalent:@"B"];
var logoffMenuItem = [[CPMenuItem alloc] initWithTitle:@"Logoff" action:@selector(logoff) keyEquivalent:@"L"];
[backupMenuItem setTarget:self];
- (void)setMenuTarget:(CPMenu)aMenu
{
for (var i=0; i < [[aMenu itemArray] count]; i++)
{
var item = [aMenu itemArray][i];
[item setTarget:self];
if ([item hasSubmenu])
{
[self setMenuTarget:[item submenu]];
@import <AppKit/CPView.j>
@import "../Models/Menu.j"
@implementation WorkflowTreeViewTemplate : CPView
{
CPImageView _imageView @accessors(property=image);
CPString _text @accessors(property=text);
RoundedView _countView @accessors(property=countView);
CPTextField _countText @accessors(property=countText);
}
@import <AppKit/CPView.j>
@import <AppKit/CPOutlineView.j>
@import "../Models/Menu.j"
@import "../Controllers/WorkflowViewController.j"
@import "../Controllers/MenuController.j"
@import "WorkflowTreeViewTemplate.j"
@implementation JobsManagerView : CPView
{
CPSplitView _verticalSplitView;
@import <AppKit/CPButton.j>
@implementation AnchorLink : CPButton
{
}
- (void)setObjectvalue:(id)anObjectValue
{
debugger;
@import <AppKit/CPButton.j>
@implementation AnchorLink : CPButton
{
}
- (void)setObjectvalue:(id)anObjectValue
{
debugger;
_reportDetails = [[CPTextField alloc] initWithFrame:CGRectMake(0,27,CGRectGetWidth([_detailsContainer bounds]) - 15,0)];
[_reportDetails setStringValue:@"Select a file to show details here"];
[_reportDetails setEditable:NO];
[_reportDetails setBezeled:YES];
[_reportDetails setLineBreakMode:CPLineBreakByWordWrapping];
[_reportDetails setFont:[CPFont systemFontOfSize:12.0]];
[_reportDetails sizeToFit];
- (void)authenticationResult:(BOOL)aResult
{
console.log("result received: " + aResult);
[_loginController closeModal];
if (aResult == YES)
{
// Prepare the Application Toolbar
_appToolbar = [[CPToolbar alloc] initWithIdentifier:@"mainToolbar"];
[_appToolbar setDelegate:self];
- (void)authenticationResult:(BOOL)aResult
{
console.log("result received: " + aResult);
[_loginController closeModal];
if (aResult == YES)
{
// Prepare the Application Toolbar
_appToolbar = [[CPToolbar alloc] initWithIdentifier:@"mainToolbar"];
[_appToolbar setDelegate:self];
. sender: CPToolbarItem
. $KVOPROXY: _CPKVOProxy
. _UID: 18011
. _action: "tickets:"
. _alternateImage: CPImage
. _autovalidates: true
. _image: CPImage
. _isEnabled: true
. _itemIdentifier: "AirplaneTicketTII"
. _label: "Pasajes"