Skip to content

Commit 6cc6310

Browse files
author
Darius Clarke
committed
Fixed reflection lesson slide. Changed #load:forClass: to #install:forClass:category: since #load:forClass: doesn't exist.
1 parent d13f1b4 commit 6cc6310

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

trysmalltalk/js/TrySmalltalk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ var self=this;
604604
function $Lesson(){return globals.Lesson||(typeof Lesson=="undefined"?nil:Lesson)}
605605
return smalltalk.withContext(function($ctx1) {
606606
var $1;
607-
$1=_st($Lesson())._title_contents_("Reflection","\x22You can inspect and change the system at runtime.\x0a\x0aTake a look at the source code of the method #and: of the class Boolean:\x22\x0a\x0a(Boolean methodDictionary at: 'and:') source.\x0a\x0a\x22Or all the methods it sends:\x22\x0a\x0a(Boolean methodDictionary at: 'and:') messageSends.\x0a\x0a\x22Here's all the methods I implement:\x22\x0a\x0aProfStef methodDictionary.\x0a\x0a\x22Let's create a new method to go to the next lesson:\x22\x0a\x0a|newMethod|\x0anewMethod := Compiler new load: 'goToNextLesson ProfStef next.' forClass: ProfStef.\x0aProfStef class addCompiledMethod: newMethod\x0a\x0a\x22Wow! I can't wait to use my new method!\x22\x0a\x0aProfStef goToNextLesson.");
607+
$1=_st($Lesson())._title_contents_("Reflection","\x22You can inspect and change the system at runtime.\x0a\x0aTake a look at the source code of the method #and: of the class Boolean:\x22\x0a\x0a(Boolean methodDictionary at: 'and:') source.\x0a\x0a\x22Or all the methods it sends:\x22\x0a\x0a(Boolean methodDictionary at: 'and:') messageSends.\x0a\x0a\x22Here's all the methods I implement:\x22\x0a\x0aProfStef methodDictionary.\x0a\x0a\x22Let's create a new method to go to the next lesson:\x22\x0a\x0a|newMethod|\x0anewMethod := Compiler new \x0ainstall: ''goToNextLesson ProfStef next.''\x0aforClass: ProfStef\x0acategory: ''navigation''.\x0a\x0aProfStef class addCompiledMethod: newMethod\x0a\x0a\x22Wow! I can't wait to use my new method!\x22\x0a\x0aProfStef goToNextLesson.");
608608
return $1;
609609
}, function($ctx1) {$ctx1.fill(self,"reflection",{},globals.SmalltalkSyntaxTutorial)})},
610610
args: [],

trysmalltalk/st/TrySmalltalk.st

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,10 @@ ProfStef methodDictionary.
679679
"Let''s create a new method to go to the next lesson:"
680680

681681
|newMethod|
682-
newMethod := Compiler new load: ''goToNextLesson ProfStef next.'' forClass: ProfStef.
682+
newMethod := Compiler new
683+
install: ''goToNextLesson ProfStef next.''
684+
forClass: ProfStef
685+
category: ''navigation''.
683686
ProfStef class addCompiledMethod: newMethod
684687

685688
"Wow!! I can''t wait to use my new method!!"

0 commit comments

Comments
 (0)