Skip to content

Commit

Permalink
Beautified main.nu files in 07_KVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Yedidia committed May 27, 2008
1 parent ac89f2a commit bd33a8b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
30 changes: 15 additions & 15 deletions 07_KVC/KVCFun_A/nu/main.nu
Expand Up @@ -9,24 +9,24 @@
;; Set the global variable $ac equal to the appController for easy access in the console.
(set $ac self)
(self setValue:5 forKey:"fido")
(set n (self valueForKey:"fido"))
(NSLog "fido = #{n}")
(set n (self valueForKey:"fido"))
(NSLog "fido = #{n}")
self)

(- (void) incrementFido: (id) sender is
;; We don't need to call willChangeValueForKey or didChangeValueForKey
(set @fido (+ @fido 1))
(NSLog "fido is now #{@fido}"))

(- (int) fido is
(NSLog "-fido is returning #{@fido}")
@fido)

(- (void) setFido: (int) x is
(NSLog "-setFido: is called with #{x}")
(set @fido x)))

(- (void) incrementFido: (id) sender is
;; We don't need to call willChangeValueForKey or didChangeValueForKey
(set @fido (+ @fido 1))
(NSLog "fido is now #{@fido}"))

(- (int) fido is
(NSLog "-fido is returning #{@fido}")
@fido)

(- (void) setFido: (int) x is
(NSLog "-setFido: is called with #{x}")
(set @fido x)))


(set SHOW_CONSOLE_AT_STARTUP nil)

;; @class ApplicationDelegate
Expand Down
14 changes: 7 additions & 7 deletions 07_KVC/KVCFun_FINAL/nu/main.nu
Expand Up @@ -10,14 +10,14 @@
;; Set the global variable $ac equal to the appController for easy access in the console.
(set $ac self)
(self setValue:5 forKey:"fido")
(set n (self valueForKey:"fido"))
(NSLog "fido = #{n}")
(set n (self valueForKey:"fido"))
(NSLog "fido = #{n}")
self)

(- (void) incrementFido: (id) sender is
;; We don't need to call willChangeValueForKey or didChangeValueForKey
(set @fido (+ @fido 1))
(NSLog "fido is now #{@fido}")))
(- (void) incrementFido: (id) sender is
;; We don't need to call willChangeValueForKey or didChangeValueForKey
(set @fido (+ @fido 1))
(NSLog "fido is now #{@fido}")))

(set SHOW_CONSOLE_AT_STARTUP nil)

Expand Down

0 comments on commit bd33a8b

Please sign in to comment.