public
Description: Examples from the new 3rd edition of Cocoa Programming for Mac OS X, ported to Nu
Homepage: http://programming.nu/posts/2008/05/23/cocoa-programming-with-nu
Clone URL: git://github.com/timburks/cocoa-programming-with-nu.git
Beautified main.nu files in 07_KVC
jsyedidia (author)
Mon May 26 17:44:04 -0700 2008
commit  bd33a8bd101b1be4dd07e27082d6cb65343fca5e
tree    6dc4a38ce50c0f5baa2afee3b718a3dfa5956a37
parent  ac89f2a86f948a9d4063c1178270bd222b0cd838
...
9
10
11
12
13
 
 
14
 
 
 
 
 
 
 
 
 
 
 
 
 
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
...
9
10
11
 
 
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
31
32
0
@@ -9,24 +9,24 @@
0
         ;; Set the global variable $ac equal to the appController for easy access in the console.
0
         (set $ac self)
0
         (self setValue:5 forKey:"fido")
0
- (set n (self valueForKey:"fido"))
0
- (NSLog "fido = #{n}")
0
+ (set n (self valueForKey:"fido"))
0
+ (NSLog "fido = #{n}")
0
         self)
0
+
0
+ (- (void) incrementFido: (id) sender is
0
+ ;; We don't need to call willChangeValueForKey or didChangeValueForKey
0
+ (set @fido (+ @fido 1))
0
+ (NSLog "fido is now #{@fido}"))
0
+
0
+ (- (int) fido is
0
+ (NSLog "-fido is returning #{@fido}")
0
+ @fido)
0
+
0
+ (- (void) setFido: (int) x is
0
+ (NSLog "-setFido: is called with #{x}")
0
+ (set @fido x)))
0
 
0
- (- (void) incrementFido: (id) sender is
0
- ;; We don't need to call willChangeValueForKey or didChangeValueForKey
0
- (set @fido (+ @fido 1))
0
- (NSLog "fido is now #{@fido}"))
0
-
0
- (- (int) fido is
0
- (NSLog "-fido is returning #{@fido}")
0
- @fido)
0
-
0
- (- (void) setFido: (int) x is
0
- (NSLog "-setFido: is called with #{x}")
0
- (set @fido x)))
0
 
0
-
0
 (set SHOW_CONSOLE_AT_STARTUP nil)
0
 
0
 ;; @class ApplicationDelegate
...
10
11
12
13
14
 
 
15
16
17
18
19
20
 
 
 
 
 
21
22
23
...
10
11
12
 
 
13
14
15
 
 
 
 
 
16
17
18
19
20
21
22
23
0
@@ -10,14 +10,14 @@
0
         ;; Set the global variable $ac equal to the appController for easy access in the console.
0
         (set $ac self)
0
         (self setValue:5 forKey:"fido")
0
- (set n (self valueForKey:"fido"))
0
- (NSLog "fido = #{n}")
0
+ (set n (self valueForKey:"fido"))
0
+ (NSLog "fido = #{n}")
0
         self)
0
-
0
- (- (void) incrementFido: (id) sender is
0
- ;; We don't need to call willChangeValueForKey or didChangeValueForKey
0
- (set @fido (+ @fido 1))
0
- (NSLog "fido is now #{@fido}")))
0
+
0
+ (- (void) incrementFido: (id) sender is
0
+ ;; We don't need to call willChangeValueForKey or didChangeValueForKey
0
+ (set @fido (+ @fido 1))
0
+ (NSLog "fido is now #{@fido}")))
0
 
0
 (set SHOW_CONSOLE_AT_STARTUP nil)
0
 

Comments

    No one has commented yet.