Skip to content

Instantly share code, notes, and snippets.

View j4johnfox's full-sized avatar

John C Fox j4johnfox

View GitHub Profile
- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRow
{
if (![timePlaceMarkerArray count])
{
return nil;
}
var myMarker = [timePlaceMarkerArray objectAtIndex:aRow];
var myValue = "";
(function() {
{var the_class = objj_allocateClassPair(MKMapItem, "MKMarker"),
meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_gMarker"), new objj_ivar("_location"), new objj_ivar("_draggable"), new objj_ivar("_withShadow"), new objj_ivar("_iconUrl"), new objj_ivar("_shadowUrl"), new objj_ivar("_delegate")]);
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
class_addMethods(the_class, [new objj_method(sel_getUid("gMarker"), function $MKMarker__gMarker(self, _cmd)
{ with(self)
{
return _gMarker;
//
// MMSLoginToolbarItemView.j
// StepInsideWeb
//
// Created by John Fox on 10/8/09.
// Copyright GroupSmarts, LLC 2009. All rights reserved.
//
@import <AppKit/CPView.j>
@import "MMSAuthenticationController.j"
@import <Foundation/CPString.j>
@implementation CPString (MMSCategories)
- (CPString)stringByEsapingHTMLEncoding
// Bruteforce way, stolen from Prototype for unescaping
// HTML encoded strings (e.g. convert &quote; to ")
{
var temp = document.createElement("div");
temp.innerHTML = self;
- (void)configureThumbnailScroller
{
[thumbnailsContainerView setBackgroundColor:[CPColor blackColor]];
var photosListItem = [[CPCollectionViewItem alloc] init];
[photosListItem setView:[[MMSPhotoCell alloc] initWithFrame:CGRectMakeZero()]];
photosCollectionView = [[CPCollectionView alloc] initWithFrame:CGRectMake(0, 0,
([thumbnailsScrollView frame].size.width), [thumbnailsScrollView frame].size.height)];
[CPApp beginSheet:flickrAuthWindow
modalForWindow:[[CPApp delegate] mainWindow]
modalDelegate:self
didEndSelector:nil
contextInfo:nil];
captionView = [[CPTextField alloc] initWithFrame:myCaptionFrame];
var myShadow = [CPShadow shadowWithOffset:CGSizeMake(2, 2) blurRadius:3 color:[CPColor darkGrayColor]];
[captionView setTextShadow:myShadow];
captionView = [[CPTextField alloc] initWithFrame:myCaptionFrame];
var myShadow = [CPShadow shadowWithOffset:CGSizeMake(2, 2) blurRadius:3 color:[CPColor darkGrayColor]];
[captionView setTextShadow:myShadow];
- (id)init
{
self = [self initWithContentRect:CGRectMake(0.0, 0.0, 500.0, 165.0) styleMask:CPHUDBackgroundWindowMask | CPClosableWindowMask | CPResizableWindowMask];
if (self)
{
[self setTitle:@"Photos"];
[self setFloatingPanel:YES];
@import <AppKit/CPButton.j>
@implementation MMSToolbarButton : CPButton
{
CPString identifier @accessors;
CPString buttonType @accessors;
}
- (id)initWithFrame:(CPRect)frame
{