TrySmalltalk.st 17 KB

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