This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <Foundation/CPObject.j> | |
@implementation AppController : CPObject | |
{ | |
CPWindow theWindow; //this "outlet" is connected automatically by the Cib | |
@outlet CPTextField nameTextField; | |
} | |
- (void)applicationDidFinishLaunching:(CPNotification)aNotification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2010, Johannes Fahrenkrug, http://springenwerk.com | |
# Run it like this: | |
# ruby script/runner clear_diskcache.rb http://mysite.com/some/page http://mysite.com/some/other/page | |
if ARGV.size < 1 | |
puts "Please supply one or more URLs!" | |
exit | |
else | |
ms = Radiant::Cache::MetaStore.new | |
ARGV.each do |url| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)doubleClick:(id)sender { | |
NSLog(@"Double clicked on icon: %@", [[sender representedObject] valueForKey:@"name"]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MyViewController : NSViewController <NSCollectionViewDelegate> | |
{ | |
IBOutlet NSCollectionView *collectionView; | |
IBOutlet NSArrayController *arrayController; | |
NSMutableArray *images; | |
NSUInteger sortingMode; | |
BOOL alternateColors; | |
NSArray *savedAlternateColors; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "IconCollectionItem.h" | |
@implementation IconCollectionItem | |
- (void)doubleClick:(id)sender { | |
NSLog(@"double click in the collectionItem"); | |
if([self collectionView] && [[self collectionView] delegate] && [[[self collectionView] delegate] respondsToSelector:@selector(doubleClick:)]) { | |
[[[self collectionView] delegate] performSelector:@selector(doubleClick:) withObject:self]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Cocoa/Cocoa.h> | |
@interface IconCollectionItem : NSCollectionViewItem { | |
} | |
- (void)doubleClick:(id)sender; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation IconViewBox | |
// ------------------------------------------------------------------------------- | |
// hitTest:aPoint | |
// ------------------------------------------------------------------------------- | |
- (NSView *)hitTest:(NSPoint)aPoint | |
{ | |
// don't allow any mouse clicks for subviews in this view | |
if(NSPointInRect(aPoint,[self convertRect:[self bounds] toView:[self superview]])) { | |
return self; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface IconViewBox : NSBox | |
{ | |
IBOutlet id delegate; | |
} | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo < ActiveRecord::Base | |
def self.test_big_text | |
text = %{<r:trip> | |
<h1><r:countries/></h1> | |
<div class="dtIntro clearfix"> | |
<div class="grid g460"> | |
<h2 class="bold"><r:title/></h2> | |
<h3><r:trip_kind_description/> ab <strong>€ <r:baseprice/></strong></h3> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)controlTextDidEndEditing:(id)sender { | |
if ([sender object] == searchField) { | |
[self searchLocation]; | |
} | |
} | |
- (void)searchLocation { | |
if ([searchField stringValue]) { | |
[mapController moveMapToAddress:[searchField stringValue]]; | |
[locationDetailController setNameIfEmpty:[searchField stringValue]]; |