public
Description: A popular sample Cocoa application rewritten in Nu. Original code by Aaron Hillegass, ported to Nu by Tim Burks.
Homepage: http://programming.nu/posts/2007/12/12/nupagepacker
Clone URL: git://github.com/timburks/nupagepacker.git
Use 10.5 BridgeSupport files to read constants.
timburks (author)
Mon Dec 10 17:04:29 -0800 2007
commit  08ba424fa2efc43f8b56ea0bcbf8485060ddc994
tree    7493b392c116a273d7cf59e935f7f97279d4e506
parent  ddc168423ac5590bfceaff3ecdf0f2f3b30bf155
...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
...
5
6
7
 
 
 
 
 
 
 
 
 
 
 
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
0
@@ -5,14 +5,21 @@
0
 ;;
0
 ;; @copyright Copyright (c) 2007 Tim Burks, Neon Design Technology, Inc.
0
 
0
-(global kPDFDisplaySinglePage 0)
0
-(global NSDragOperationCopy 1)
0
-(global NSPDFPboardType "Apple PDF pasteboard type")
0
-(global NSDragPboard "Apple CFPasteboard drag")
0
-(global NSRectClip (NuBridgedFunction functionWithName:"NSRectClip" signature:"v{_NSRect}"))
0
-(global NSIntersectionRect (NuBridgedFunction functionWithName:"NSIntersectionRect" signature:"{_NSRect}{_NSRect}{_NSRect}"))
0
-(global NSPointInRect (NuBridgedFunction functionWithName:"NSPointInRect" signature:"i{_NSPoint}{_NSRect}"))
0
-(global NSFilenamesPboardType "NSFilenamesPboardType")
0
-(global NSIntersectsRect (NuBridgedFunction functionWithName:"NSIntersectsRect" signature:"i{_NSRect}{_NSRect}"))
0
-(global NSInsetRect (NuBridgedFunction functionWithName:"NSInsetRect" signature:"{_NSRect}{_NSRect}ff"))
0
-(global NSSquareLineCapStyle 2)
0
\ No newline at end of file
0
+;; Switch on OS release.
0
+(if (>= 9 ((((NSString stringWithShellCommand:"uname -r") componentsSeparatedByString:".") objectAtIndex:0) intValue))
0
+ (then ;; Use Leopard BridgeSupport files
0
+ (load "bridgesupport")
0
+ (import AppKit)
0
+ (import Quartz))
0
+ (else ;; declare constants manually
0
+ (global kPDFDisplaySinglePage 0)
0
+ (global NSDragOperationCopy 1)
0
+ (global NSPDFPboardType "Apple PDF pasteboard type")
0
+ (global NSDragPboard "Apple CFPasteboard drag")
0
+ (global NSRectClip (NuBridgedFunction functionWithName:"NSRectClip" signature:"v{_NSRect}"))
0
+ (global NSIntersectionRect (NuBridgedFunction functionWithName:"NSIntersectionRect" signature:"{_NSRect}{_NSRect}{_NSRect}"))
0
+ (global NSPointInRect (NuBridgedFunction functionWithName:"NSPointInRect" signature:"i{_NSPoint}{_NSRect}"))
0
+ (global NSFilenamesPboardType "NSFilenamesPboardType")
0
+ (global NSIntersectsRect (NuBridgedFunction functionWithName:"NSIntersectsRect" signature:"i{_NSRect}{_NSRect}"))
0
+ (global NSInsetRect (NuBridgedFunction functionWithName:"NSInsetRect" signature:"{_NSRect}{_NSRect}ff"))
0
+ (global NSSquareLineCapStyle 2)))
0
\ No newline at end of file

Comments

    No one has commented yet.