TrySmalltalk.st 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. Widget subclass: #TrySmalltalkWidget
  2. instanceVariableNames: 'workspace contents header'
  3. category: 'TrySmalltalk'!
  4. !TrySmalltalkWidget methodsFor: 'accessing'!
  5. workspace
  6. ^ workspace ifNil: [
  7. workspace := SourceArea new]
  8. !
  9. contents: aString
  10. self workspace val: aString
  11. !
  12. contents
  13. ^self workspace val
  14. !
  15. setTitle: aString
  16. header contents: [:html | html with: aString]
  17. ! !
  18. !TrySmalltalkWidget methodsFor: 'rendering'!
  19. renderOn: html
  20. html div
  21. class: 'profStef';
  22. with: [header := html h2];
  23. with: [self workspace renderOn: html];
  24. with: [self renderButtonsOn: html].
  25. ProfStef default
  26. widget: self;
  27. showCurrentLesson
  28. !
  29. renderButtonsOn: html
  30. html button
  31. with: 'DoIt';
  32. title: 'ctrl+d';
  33. onClick: [self workspace doIt].
  34. html button
  35. with: 'PrintIt';
  36. title: 'ctrl+p';
  37. onClick: [self workspace printIt].
  38. html button
  39. with: 'InspectIt';
  40. title: 'ctrl+i';
  41. onClick: [self workspace inspectIt]
  42. ! !
  43. Object subclass: #AbstractTutorial
  44. instanceVariableNames: ''
  45. category: 'TrySmalltalk'!
  46. !AbstractTutorial methodsFor: 'not yet classified'!
  47. indexOfLesson: aSelector
  48. ^self tableOfContents indexOf: aSelector.
  49. !
  50. tableOfContents
  51. ^ #(
  52. 'welcome'
  53. 'testLesson'
  54. 'theEnd'
  55. )
  56. !
  57. welcome
  58. ^ Lesson
  59. title: 'Welcome'
  60. contents: '"Hi, this is a test tutorial."'
  61. !
  62. testLesson
  63. ^ Lesson
  64. title: 'Test Lesson'
  65. contents: '"This lesson is a test"'
  66. !
  67. theEnd
  68. ^ Lesson
  69. title: 'The End'
  70. contents: '"And that''d be pretty much it :)"'
  71. !
  72. lessonAt: anInteger
  73. | lessonSelector |
  74. lessonSelector := self tableOfContents at: anInteger.
  75. ^ self perform: lessonSelector.
  76. !
  77. size
  78. ^ self tableOfContents size
  79. ! !
  80. Object subclass: #Lesson
  81. instanceVariableNames: 'title contents'
  82. category: 'TrySmalltalk'!
  83. !Lesson methodsFor: 'not yet classified'!
  84. contents
  85. ^ contents ifNil: [contents := '']
  86. !
  87. contents: aString
  88. contents := aString
  89. !
  90. title: aString
  91. title := aString
  92. !
  93. title
  94. ^ title ifNil: [title := '']
  95. ! !
  96. !Lesson class methodsFor: 'not yet classified'!
  97. title: aTitle contents: someContents
  98. ^ (self new)
  99. title: aTitle;
  100. contents: someContents
  101. ! !
  102. Object subclass: #TutorialPlayer
  103. instanceVariableNames: 'tutorialPosition tutorial'
  104. category: 'TrySmalltalk'!
  105. !TutorialPlayer methodsFor: 'not yet classified'!
  106. currentLesson
  107. ^ self tutorial lessonAt: self tutorialPosition.
  108. !
  109. first
  110. self rewind.
  111. ^ self currentLesson
  112. !
  113. last
  114. tutorialPosition := self size.
  115. ^ self currentLesson
  116. !
  117. next
  118. self tutorialPosition < self size
  119. ifTrue: [tutorialPosition := tutorialPosition + 1].
  120. ^ self currentLesson
  121. !
  122. previous
  123. tutorialPosition > 1 ifTrue: [tutorialPosition := tutorialPosition - 1].
  124. ^ self currentLesson
  125. !
  126. rewind
  127. tutorialPosition := 1.
  128. !
  129. size
  130. ^ self tutorial size
  131. !
  132. tutorial
  133. ^ tutorial ifNil: [tutorial := SmalltalkSyntaxTutorial new]
  134. !
  135. tutorial: aTutorial
  136. tutorial := aTutorial
  137. !
  138. tutorialPosition
  139. ^ tutorialPosition ifNil: [
  140. self rewind.
  141. tutorialPosition.
  142. ].
  143. !
  144. tutorialPosition: aTutorialPosition
  145. tutorialPosition := aTutorialPosition
  146. ! !
  147. Object subclass: #ProfStef
  148. instanceVariableNames: 'tutorialPlayer widget'
  149. category: 'TrySmalltalk'!
  150. !ProfStef methodsFor: 'not yet classified'!
  151. tutorialPlayer
  152. ^ tutorialPlayer ifNil: [tutorialPlayer := TutorialPlayer new]
  153. !
  154. first
  155. self tutorialPlayer first.
  156. ^ self showCurrentLesson.
  157. !
  158. progress
  159. ^ '(', self tutorialPositionString, '/', self tutorialSizeString, ')'.
  160. !
  161. tutorialPositionString
  162. ^ self tutorialPlayer tutorialPosition asString.
  163. !
  164. tutorialSizeString
  165. ^ self tutorialPlayer size asString
  166. !
  167. next
  168. self tutorialPlayer next.
  169. ^ self showCurrentLesson.
  170. !
  171. previous
  172. self tutorialPlayer previous.
  173. ^ self showCurrentLesson.
  174. !
  175. widget: aWidget
  176. widget := aWidget
  177. !
  178. showCurrentLesson
  179. | lesson |
  180. lesson := self tutorialPlayer currentLesson.
  181. widget contents: lesson contents.
  182. widget setTitle: lesson title , ' ' , self progress.
  183. ! !
  184. ProfStef class instanceVariableNames: 'instance'!
  185. !ProfStef class methodsFor: 'not yet classified'!
  186. first
  187. ^ self default first.
  188. !
  189. default
  190. ^ instance ifNil: [instance := self new]
  191. !
  192. previous
  193. ^ self default previous.
  194. !
  195. next
  196. ^ self default next.
  197. !
  198. go
  199. self first.
  200. ! !
  201. AbstractTutorial subclass: #SmalltalkSyntaxTutorial
  202. instanceVariableNames: ''
  203. category: 'TrySmalltalk'!
  204. !SmalltalkSyntaxTutorial methodsFor: 'not yet classified'!
  205. tableOfContents
  206. ^ #( 'welcome'
  207. 'doingVSPrinting'
  208. 'printing'
  209. 'basicTypesNumbers'
  210. "'basicTypesCharacters'"
  211. 'basicTypesString'
  212. "'basicTypesSymbol'"
  213. 'basicTypesArray'
  214. 'basicTypesDynamicArray'
  215. 'messageSyntaxUnary'
  216. 'messageSyntaxBinary'
  217. 'messageSyntaxKeyword'
  218. 'messageSyntaxExecutionOrder'
  219. 'messageSyntaxExecutionOrderParentheses'
  220. 'mathematicalPrecedence'
  221. 'messageSyntaxCascade'
  222. 'messageSyntaxCascadeShouldNotBeHere'
  223. 'blocks'
  224. 'blocksAssignation'
  225. 'conditionals'
  226. 'loops'
  227. 'iterators'
  228. 'instanciation'
  229. 'reflection'
  230. 'reflectionContinued'
  231. "'pharoEnvironment'"
  232. "'debugger'"
  233. 'theEnd' )
  234. !
  235. basicTypesArray
  236. ^ Lesson
  237. title: 'Basic types: Array'
  238. contents:
  239. '"Literal arrays are created at parse time:"
  240. #(1 2 3).
  241. #( 1 2 3 #(4 5 6)) size.
  242. #(1 2 4) isEmpty.
  243. #(1 2 3) first.
  244. #(''hello'' ''Javascript'') at: 2 put: ''Smalltalk''; yourself.
  245. ProfStef next.'
  246. !
  247. basicTypesCharacters
  248. ^ Lesson
  249. title: 'Basic types: Characters'
  250. contents:
  251. '"A Character can be instantiated using $ operator:"
  252. $A.
  253. $A class.
  254. $B charCode.
  255. Character cr.
  256. Character space.
  257. "You can print all 256 characters of the ASCII extended set:"
  258. Character allByteCharacters.
  259. ProfStef next.'
  260. !
  261. basicTypesDynamicArray
  262. ^ Lesson
  263. title: 'Basic types: Dynamic Array'
  264. contents:
  265. '"Dynamic Arrays are created at execution time:"
  266. { (2+3) . (6*6) }.
  267. { (2+3) . (6*6) . ''hello'', '' Stef''} size.
  268. { ProfStef } first next.'
  269. !
  270. basicTypesNumbers
  271. ^ Lesson
  272. title: 'Basic types: Numbers'
  273. contents:
  274. '"You now know how to execute Smalltalk code.
  275. Now let''s talk about basic objects.
  276. 1, 2, 100, 2/3 ... are Numbers, and respond to many messages evaluating mathematical expressions.
  277. Evaluate these ones:"
  278. 2.
  279. (1/3).
  280. (1/3) + (4/5).
  281. (18/5) rounded.
  282. 1 class.
  283. 1 negated.
  284. 1 negated negated.
  285. (1 + 3) odd.
  286. ProfStef next.'
  287. !
  288. basicTypesString
  289. ^ Lesson
  290. title: 'Basic types: Strings'
  291. contents:
  292. '"A String is a collection of characters. Use single quotes to create a String object. Print these expressions:"
  293. ''ProfStef''.
  294. ''ProfStef'' size.
  295. ''abc'' asUppercase.
  296. ''Hello World'' reversed.
  297. "You can access each character using at: message"
  298. ''ProfStef'' at: 1.
  299. "String concatenation uses the comma operator:"
  300. ''ProfStef'', '' is cool''.
  301. ProfStef next.'
  302. !
  303. basicTypesSymbol
  304. ^ Lesson
  305. title: 'Basic types: Symbols'
  306. contents:
  307. '"A Symbol is a String which is guaranteed to be globally unique.
  308. There is one and only one Symbol #ProfStef. There may be several ''ProfStef'' String objects.
  309. (Message == returns true if the two objects are the SAME)"
  310. ''ProfStef'' asSymbol.
  311. #ProfStef asString.
  312. (2 asString) == (2 asString).
  313. (2 asString) asSymbol == (2 asString) asSymbol.
  314. (Smalltalk at: #ProfStef) next.'
  315. !
  316. blocks
  317. ^ Lesson
  318. title: 'Blocks'
  319. contents:
  320. '"Cascade is cool !! Let''s talk about blocks.
  321. Blocks are anonymous methods that can be stored into variables and executed on demand.
  322. Blocks are delimited by square brackets: []"
  323. [Transcript open].
  324. "does not open a Transcript because the block is not executed.
  325. Here is a block that adds 2 to its argument (its argument is named x):"
  326. [:x | x+2].
  327. "We can execute a block by sending it value messages."
  328. [:x | x+2] value: 5.
  329. [Transcript open] value.
  330. [:x | x+2] value: 10.
  331. [:x :y| x + y] value:3 value:5.
  332. [ProfStef next] value.'
  333. !
  334. blocksAssignation
  335. ^ Lesson
  336. title: 'Block assignation'
  337. contents:
  338. '"Blocks can be assigned to a variable then executed later.
  339. Note that |b| is the declaration of a variable named ''b'' and that '':='' assigns a value to a variable.
  340. Select the three lines then Print It:"
  341. |b|
  342. b := [:x | x+2].
  343. b value: 12.
  344. ProfStef next.'
  345. !
  346. conditionals
  347. ^ Lesson
  348. title: 'Conditionals'
  349. contents:
  350. '"Conditionals are just messages sent to Boolean objects"
  351. 1 < 2
  352. ifTrue: [100]
  353. ifFalse: [42].
  354. "Here the message is ifTrue:ifFalse
  355. Try this:"
  356. Transcript open.
  357. 3 > 10
  358. ifTrue: [Transcript show: ''maybe there''''s a bug ....'']
  359. ifFalse: [Transcript show: ''No : 3 is less than 10''].
  360. 3 = 3 ifTrue: [ProfStef next].'.
  361. !
  362. debugger
  363. ^ Lesson
  364. title: 'Debugger'
  365. contents: '"The Debugger may be the most famous tool of Smalltalk environments. It will open as soon as an unmanaged Exception occurs.
  366. The following code will open the debugger.
  367. ***This should be rethought completely***"
  368. '
  369. !
  370. doingVSPrinting
  371. ^ Lesson
  372. title: 'Doing VS Printing: Doing'
  373. contents:
  374. '"Cool !! (I like to say Cooool :) ). You''ve just executed a Smalltalk expression. More precisely, you sent the message ''next'' to
  375. ProfStef class (it''s me !!).
  376. Note you can run this tutorial again by evaluating: ''ProfStef go''.
  377. ''ProfStef previous'' returns to the previous lesson.
  378. You can also Do It using the keyboard shortcut ''CTRL d''
  379. Try to evaluate this expression:"
  380. window alert: ''hello world!!''.
  381. "Then go to the next lesson:"
  382. ProfStef next.'
  383. !
  384. instanciation
  385. ^ Lesson
  386. title: 'Instanciation'
  387. contents:
  388. '"Objects are instances of their class. Usually, we send the message #new to a class for creating an instance of this class.
  389. For example, let''s create an instance of the class Array:"
  390. Array new
  391. add: ''Some text'';
  392. add: 3.;
  393. yourself.
  394. "See the array we''ve created? Actually, #(''Some text'' 3) is just a shorthand for instantiating arrays."
  395. "If we use a variable to keep track of this object, we''ll be able to do stuff with it."
  396. "The following code must be ran all at one, as the ''anArray'' variable will cease to exist once the execution finishes:"
  397. |anArray|
  398. anArray := Array new
  399. add: ''Some text'';
  400. add: 3;
  401. yourself;
  402. Transcript show: anArray; cr.
  403. anArray remove: 3.
  404. Transcript show: anArray; cr.
  405. anArray add: ''Some more text!!''.
  406. Transcript show: anArray; cr.
  407. "I''ll put myself in an instance of a class named Dictionary and go to the next lesson:"
  408. ((Dictionary new add: (''move on!!'' -> ProfStef)) at: ''move on!!'') next'
  409. !
  410. iterators
  411. ^ Lesson
  412. title: 'Iterators'
  413. contents:
  414. '"The message do: is sent to a collection of objects (Array, Dictionary, String, etc), evaluating the block for each element.
  415. Here we want to print all the numbers on the Transcript (a console)"
  416. #(11 38 3 -2 10) do: [:each |
  417. Transcript show: each printString; cr].
  418. "Some other really nice iterators"
  419. #(11 38 3 -2 10) collect: [:each | each negated].
  420. #(11 38 3 -2 10) collect: [:each | each odd].
  421. #(11 38 3 -2 10) select: [:each | each odd].
  422. #(11 38 3 -2 10) select: [:each | each > 10].
  423. #(11 38 3 -2 10) reject: [:each | each > 10].
  424. #(11 38 3 -2 10)
  425. do: [:each | Transcript show: each printString]
  426. separatedBy: [Transcript show: ''.''].
  427. (Smalltalk current classes select: [:eachClass | eachClass name = ''ProfStef'']) do: [:eachProfstef | eachProfstef next].'
  428. !
  429. loops
  430. ^ Lesson
  431. title: 'Loops'
  432. contents:
  433. '"Loops are high-level collection iterators, implemented as regular methods."
  434. "Basic loops:
  435. to:do:
  436. to:by:do"
  437. 1 to: 100 do:
  438. [:i | Transcript show: i asString; cr ].
  439. 1 to: 100 by: 3 do: [:i | Transcript show: i asString; cr].
  440. 100 to: 0 by: -2 do:
  441. [:i | Transcript show: i asString; cr].
  442. 1 to: 1 do: [:i | ProfStef next].'
  443. !
  444. mathematicalPrecedence
  445. ^ Lesson
  446. title: 'Mathematical precedence'
  447. contents:
  448. '"Traditional precedence rules from mathematics do not follow in Smalltalk."
  449. 2 * 10 + 2.
  450. "Here the message * is sent to 2, which answers 20, then 20 receive the message +
  451. Remember that all messages always follow a simple left-to-right precedence rule, * without exceptions *."
  452. 2 + 2 * 10.
  453. 2 + (2 * 10).
  454. 8 - 5 / 2.
  455. (8 - 5) / 2.
  456. 8 - (5 / 2).
  457. ProfStef next.'
  458. !
  459. messageSyntaxBinary
  460. ^ Lesson
  461. title: 'Message syntax: Binary messages'
  462. contents:
  463. '"Binary messages have the following form:
  464. anObject + anotherObject"
  465. 3 * 2.
  466. Date today year = 2011.
  467. false | false.
  468. true & true.
  469. true & false.
  470. 10 @ 100.
  471. 10 <= 12.
  472. ''ab'', ''cd''.
  473. ProfStef next.'
  474. !
  475. messageSyntaxCascade
  476. ^ Lesson
  477. title: 'Message syntax: Cascade'
  478. contents:
  479. '"; is the cascade operator. It''s useful to send message to the SAME receiver
  480. Open a Transcript (console):"
  481. Transcript open.
  482. "Then:"
  483. Transcript show: ''hello''.
  484. Transcript show: ''Smalltalk''.
  485. Transcript cr.
  486. "is equivalent to:"
  487. Transcript
  488. show: ''hello'';
  489. show: ''Smalltalk'' ;
  490. cr.
  491. "You can close the development tools by clicking on the red circle with a cross at the bottom left of the website.
  492. Try to go to the next lesson with a cascade of two ''next'' messages:"
  493. ProfStef'.
  494. !
  495. messageSyntaxCascadeShouldNotBeHere
  496. ^ Lesson
  497. title: 'Lost ?'
  498. contents:
  499. '"Hey, you should not be here !!!!
  500. Go back and use a cascade !!"
  501. ProfStef previous.'.
  502. !
  503. messageSyntaxExecutionOrder
  504. ^ Lesson
  505. title: 'Message syntax: Execution order'
  506. contents:
  507. '"Unary messages are executed first, then binary messages and finally keyword messages:
  508. Unary > Binary > Keywords"
  509. 2.5 + 3.8 rounded.
  510. 3 max: 2 + 2.
  511. (0@0) class.
  512. 0@0 x: 100.
  513. (0@0 x: 100) class.
  514. "Between messages of similar precedence, expressions are executed from left to right"
  515. -12345 negated asString reversed.
  516. ProfStef next.'
  517. !
  518. messageSyntaxExecutionOrderParentheses
  519. ^ Lesson
  520. title: 'Message syntax: Parentheses'
  521. contents:
  522. '"Use parentheses to change order of evaluation"
  523. (2.5 + 3.8) rounded.
  524. (3 max: 2) + 2.
  525. ProfStef next.'
  526. !
  527. messageSyntaxKeyword
  528. ^ Lesson
  529. title: 'Message syntax: Keyword messages'
  530. contents:
  531. '"Keyword Messages are messages with arguments. They have the following form:
  532. anObject akey: anotherObject akey2: anotherObject2"
  533. ''Web development is a good deal of pain'' copyFrom: 1 to: 30
  534. "The message is copyFrom:to: sent to the String ''Web development is a good deal of pain''"
  535. 1 max: 3.
  536. Array with: ''hello'' with: 2 with: Smalltalk.
  537. "The message is with:with:with: implemented on class Array. Note you can also write"
  538. Array
  539. with: ''Hi there!!''
  540. with: 2
  541. with: Smalltalk.
  542. ProfStef perform: ''next''.'
  543. !
  544. messageSyntaxUnary
  545. ^ Lesson
  546. title: 'Message syntax: Unary messages'
  547. contents:
  548. '"Messages are sent to objects. There are three types of message: Unary, Binary and Keyword.
  549. Unary messages have the following form:
  550. anObject aMessage
  551. You''ve already sent unary messages. For example:"
  552. 1 class.
  553. false not.
  554. Date today.
  555. Number pi.
  556. "And of course: "
  557. ProfStef next.'
  558. !
  559. pharoEnvironment
  560. ^ Lesson
  561. title: 'Pharo environment'
  562. contents:
  563. '"Every Smalltalk system is full of objects. There are windows, text, numbers, dates, colors, points and much more. You can interact with objects in a much more direct way than is possible with other programming languages.
  564. Every object understands the message ''explore''. As a result, you get an Explorer window that shows details about the object."
  565. Date today explore.
  566. "This shows that the date object consists of a point in time (start) and a duration (one day long)."
  567. ProfStef explore.
  568. "You see, ProfStef class has a lot of objects. Let''s take a look at my code:"
  569. ProfStef browse.
  570. ProfStef next.'
  571. !
  572. printing
  573. ^ Lesson
  574. title: 'Doing VS Printing: Printing'
  575. contents:
  576. '"Now you''re a Do It master !! Let''s talk about printing. It''s a Do It which prints the result next to the expression you''ve selected.
  577. For example, select the text below, and click on ''PrintIt'':"
  578. 1 + 2.
  579. "As with ''DoIt'', there is also a shortcut to execute this command.
  580. Try CTRL-p on the following expressions:"
  581. Date today.
  582. "The result is selected, so you can erase it using the backspace key. Try it !!"
  583. Date today asDateString.
  584. Date today asTimeString.
  585. ProfStef next.'
  586. !
  587. reflection
  588. ^ Lesson
  589. title: 'Reflection'
  590. contents:
  591. '"You can inspect and change the system at runtime.
  592. Take a look at the source code of the method #and: of the class Boolean:"
  593. (Boolean methodDictionary at: ''and:'') source.
  594. "Or all the methods it sends:"
  595. (Boolean methodDictionary at: ''and:'') messageSends.
  596. "Here''s all the methods I implement:"
  597. ProfStef methodDictionary.
  598. "Let''s create a new method to go to the next lesson:"
  599. |newMethod|
  600. newMethod := Compiler new load: ''goToNextLesson ProfStef next.'' forClass: ProfStef.
  601. ProfStef class addCompiledMethod: newMethod
  602. "Wow!! I can''t wait to use my new method!!"
  603. ProfStef goToNextLesson.'
  604. !
  605. reflectionContinued
  606. ^ Lesson
  607. title: 'Reflection continued'
  608. contents:
  609. '"So cool, isn''t it ? Before going further, let''s remove this method:"
  610. ProfStef class methodAt: #goToNextLesson.
  611. ProfStef class removeCompiledMethod: (ProfStef class methodAt: #goToNextLesson).
  612. ProfStef class methodAt: #goToNextLesson.
  613. "Then move forward:"
  614. ProfStef perform:#next'
  615. !
  616. theEnd
  617. ^ Lesson
  618. title: 'Tutorial done !!'
  619. contents:
  620. '"This tutorial is done. Enjoy programming Smalltalk with JTalk.
  621. You can run this tutorial again by evaluating: ProfStef go.
  622. See you soon !!"
  623. '
  624. !
  625. welcome
  626. ^ Lesson
  627. title: 'Welcome'
  628. contents:
  629. ' "Hello!! I''m Professor Stef.
  630. You must want me to help you learn Smalltalk.
  631. So let''s go to the first lesson. Select the text below and click on the ''DoIt'' button"
  632. ProfStef next.'
  633. ! !