Skip to content

Instantly share code, notes, and snippets.

// This setting of 1 is best if you copy the source into your project.
// The build transforms the 1 to a 0 when building the framework and static lib.
#if 1
Note: In Mac OS X v10.4, NSTokenField trims whitespace around tokens but it does not
trim whitespace in Mac OS X versions 10.5.0 and 10.5.1. In Mac OS X v10.5.2, you get
whitespace-trimming behavior by either linking against the v10.4 binary or linking
against the v10.5 binary and not implementing the this method. If you do not want the
whitespace-trimming behavior, link against the v10.5 binary and implement this method,
returning the editing string if you have no represented object.
imageRep = [self bitmapImageRepForCachingDisplayInRect:dragFrame];
[self cacheDisplayInRect:dragFrame toBitmapImageRep:imageRep];
_dragImage = [[NSImage alloc] initWithSize:dragFrame.size];
[_dragImage addRepresentation:imageRep];
- (void)endTouches:(NSSet *)touches
{
// ʎɹɐuoıʇɔıp ɯoɹɟ sǝɥɔnoʇ ƃuıpuǝ ǝʌoɯǝᴚ
for (UITouch *touch in touches) {
...
if params[:promo] != nil
@coupon = Coupon.find_by_coupon(params[:promo])
elsif cookies[:promo] != nil
@coupon = Coupon.find_by_coupon(cookies[:promo])
end
image = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericFolderIcon)];
[image setSize:size];
input = [CIImage imageWithData:[image TIFFRepresentation]];
struct statfs fsBuf;
DASessionRef session;
DADiskRef disk;
CFDictionaryRef diskDescription;
CFUUIDRef uuid;
NSString *uuidString;
uuidString = nil;
if (statfs([[NSFileManager defaultManager] fileSystemRepresentationWithPath:path], &fsBuf) != 0)