Skip to content

Instantly share code, notes, and snippets.

View classilla's full-sized avatar
🕶️
DEAL WITH IT.

Cameron Kaiser classilla

🕶️
DEAL WITH IT.
View GitHub Profile
@classilla
classilla / datepanel.m
Created July 28, 2018 17:01
A simple modal date panel using undocumented methods in Mac OS X Tiger.
#import <Cocoa/Cocoa.h>
// (C)2018 Cameron Kaiser. BSD license.
// gcc -o datepanel datepanel.m -framework Cocoa
// 10.4 does not have an accessory view method for NSAlert, but we can
// simulate it with these undocumented methods.
@interface NSAlert(WithCustomStyle)
- (void)prepare;
- (id)buildAlertStyle:(int)fp8 title:(id)fp12 formattedMsg:(id)fp16 first:(id)fp20 second:(id)fp24 third:(id)fp28 oldStyle:(BOOL)fp32;