From lists at mostrom.pp.se Wed Jun 4 17:31:29 2008 From: lists at mostrom.pp.se (=?UTF-8?Q?Ja=6E_E=72ik_M=6Fs=74=72=C3=B6?= =?UTF-8?Q?m?=) Date: Wed, 4 Jun 2008 17:31:29 +0200 Subject: [sbe-discussion] Beginners question Message-ID: I've just started to work through the SBE book and managed to fail already on SB-Quito example. I followed the steps in the book and created a initialize method: initialize super initialize self label: ''. self borderWidth: 2. bounds := 0 at 0 corner: 16 at 16. offColor := Color paleYellow. onColor := Color paleBlue darker. self useSquareCorners. self turnOff I can 'accept' the code, but when I try to run 'SBECell new' I get the following error message SBECell(Object)>>doesNotUnderstand: #self SBECell>>initialize SBECell class(Behavior)>>new UndefinedObject>>DoIt Since I know nothing about Squeak/smalltalk I don't understand the error message. Is there someone that can give me an hint of what could be wrong? -- Jan Erik Mostr?m, www.mostrom.pp.se From stephane.ducasse at free.fr Wed Jun 4 17:35:08 2008 From: stephane.ducasse at free.fr (stephane ducasse) Date: Wed, 4 Jun 2008 17:35:08 +0200 Subject: [sbe-discussion] Re: Beginners question In-Reply-To: References: Message-ID: <02DDFC1F-AEDE-4526-BFBD-4EC53487CC66@free.fr> On Jun 4, 2008, at 5:31 PM, Jan Erik Mostr?m wrote: > I've just started to work through the SBE book and managed to > fail already on SB-Quito example. I followed the steps in the > book and created a initialize method: > > initialize > super initialize . > > self label: ''. > self borderWidth: 2. > bounds := 0 at 0 corner: 16 at 16. > offColor := Color paleYellow. > onColor := Color paleBlue darker. > self useSquareCorners. > self turnOff > > I can 'accept' the code, but when I try to run 'SBECell new' I > get the following error message > > SBECell(Object)>>doesNotUnderstand: #self > SBECell>>initialize > SBECell class(Behavior)>>new > UndefinedObject>>DoIt > > Since I know nothing about Squeak/smalltalk I don't understand > the error message. Is there someone that can give me an hint of > what could be wrong? > -- > Jan Erik Mostr?m, www.mostrom.pp.se > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From serge.stinckwich at doesnotunderstand.org Wed Jun 4 17:36:42 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Wed, 4 Jun 2008 17:36:42 +0200 Subject: [sbe-discussion] Re: Beginners question In-Reply-To: <02DDFC1F-AEDE-4526-BFBD-4EC53487CC66@free.fr> References: <02DDFC1F-AEDE-4526-BFBD-4EC53487CC66@free.fr> Message-ID: <1ea823c30806040836r3a7a5252h4843fddc6b188098@mail.gmail.com> 2008/6/4 stephane ducasse : > > On Jun 4, 2008, at 5:31 PM, Jan Erik Mostr?m wrote: > >> I've just started to work through the SBE book and managed to >> fail already on SB-Quito example. I followed the steps in the >> book and created a initialize method: >> >> initialize >> super initialize > > . I explain a bit more : there is a missing dot (.) at the end of super initialize. -- Serge Stinckwich http://blog.doesnotunderstand.org/ From black at cs.pdx.edu Wed Jun 4 18:51:41 2008 From: black at cs.pdx.edu (Andrew P. Black) Date: Wed, 4 Jun 2008 09:51:41 -0700 Subject: [sbe-discussion] Re: Beginners question In-Reply-To: <02DDFC1F-AEDE-4526-BFBD-4EC53487CC66@free.fr> References: <02DDFC1F-AEDE-4526-BFBD-4EC53487CC66@free.fr> Message-ID: <7BC3229E-C993-4985-A4E5-BDA382ACED28@cs.pdx.edu> On 4 Jun 2008, at 08:35, stephane ducasse wrote: >> Since I know nothing about Squeak/smalltalk I don't understand >> the error message. Is there someone that can give me an hint of >> what could be wrong? >> -- >> Jan Erik Mostr?m, www.mostrom.pp.se >> > You might well ask: how the f*** am I supposed to figure that out from the error message? The clue is the "doesNotUnderstand: #self". This means that "self" is being sent as a message to some object. That's not what you meant: you meant "self" to be the target of a message (to be sent to this object). A Smalltalk message send has the target on the left, with the message following it. That looks like what's on the third line: the target is self, and the message is label: ''. But Squeak obviously thinks differently: it sees the self as a message, being sent to something that precedes it. And if you look closely, that's what's there: self is being sent as a message to the object that results from super initialize, because of the missing period. That said, this is convincing me that we need a novice teaching environment for Smalltalk just as we fo for Scheme, Java, C++, etc. Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20080604/86f2a86a/attachment.html From david.mitchell at gmail.com Wed Jun 4 19:47:19 2008 From: david.mitchell at gmail.com (David Mitchell) Date: Wed, 4 Jun 2008 12:47:19 -0500 Subject: [sbe-discussion] Re: Beginners question In-Reply-To: <7BC3229E-C993-4985-A4E5-BDA382ACED28@cs.pdx.edu> References: <02DDFC1F-AEDE-4526-BFBD-4EC53487CC66@free.fr> <7BC3229E-C993-4985-A4E5-BDA382ACED28@cs.pdx.edu> Message-ID: <8bc830730806041047o22af2da8v9a4c9ae46182e2b3@mail.gmail.com> This is one of the reasons I pretty print my code. If it doesn't line up like I expect, I know there is an issue. Even if I really want to tweak the output after the pretty print, I try to resist. On Wed, Jun 4, 2008 at 11:51 AM, Andrew P. Black wrote: > > On 4 Jun 2008, at 08:35, stephane ducasse wrote: > > Since I know nothing about Squeak/smalltalk I don't understand > > the error message. Is there someone that can give me an hint of > > what could be wrong? > > -- > > Jan Erik Mostr?m, www.mostrom.pp.se > > > > You might well ask: how the f*** am I supposed to figure that out from the > error message? > The clue is the "doesNotUnderstand: #self". This means that "self" is being > sent as a message to some object. That's not what you meant: you meant > "self" to be the target of a message (to be sent to this object). > A Smalltalk message send has the target on the left, with the message > following it. That looks like what's on the third line: the target is self, > and the message is label: ''. But Squeak obviously thinks differently: it > sees the self as a message, being sent to something that precedes it. > And if you look closely, that's what's there: self is being sent as a > message to the object that results from super initialize, because > of the missing period. > That said, this is convincing me that we need a novice teaching environment > for Smalltalk just as we fo for Scheme, Java, C++, etc. > Andrew > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > From lists at mostrom.pp.se Thu Jun 5 16:49:26 2008 From: lists at mostrom.pp.se (=?UTF-8?Q?Ja=6E_E=72ik_M=6Fs=74=72=C3=B6?= =?UTF-8?Q?m?=) Date: Thu, 5 Jun 2008 16:49:26 +0200 Subject: [sbe-discussion] Re: Beginners question In-Reply-To: Message-ID: Thanks for the answer (I actually managed to type in the code twice and miss the . twice :) jem -- Jan Erik Mostr?m, www.mostrom.pp.se From ckasso at sprynet.com Thu Jun 5 18:40:53 2008 From: ckasso at sprynet.com (ckasso) Date: Thu, 05 Jun 2008 12:40:53 -0400 Subject: [sbe-discussion] last of the errata Message-ID: <1212684053.5934.4.camel@creeklock> Greetings, Page 162 two kinds of thing > two kinds of things Page 164 then then > then Page 165 for it to be practical to do it once > for it to be practical to do once -or- to be practical to do once Page 170 all the resource > all the resources Page 176 simply write > simply writes Page 177 and this especially true for brace arrays > and this is especially true for brace arrays -or- and especially for brace arrays examples shows > examples show Page 178 Method 8.4: > Method 8.4: Object equality Page 182 in you program > in your program Page 194 Figure 9.1: The collection classes in Squeak. Indentation indicates subclass- ing; Italicized classes are abstract. > -add- Classes in bold made up the collection and stream classes of Smalltalk-80 as described by the "Blue Book". Page 197 method provide by > method provided by Page 199 relize > realize they do interpret > they do, interpret suggest you to browse > suggest you browse Page 209 integers or block > integers or blocks Page 210 gives also access > also gives access on Number > in class Number Page 214 is to using xor: > is to use xor: Page 217 Stream Streams > Streams Page 221 If you want to go to the beginning or at the end is what you want, you can use reset or setToEnd. > To position to the beginning of a stream you can use reset. setToEnd positions Page 236 through mouse or the keyboard > through the mouse or the keyboard mouse events, it you cannot > mouse events, you cannot Page 247 and redefining > and redefine Page 255 Figure 12.3: The metaclasses of Translucent its superclasses > Figure 12.3: The metaclasses of Translucent and its superclasses Chris From oscar at iam.unibe.ch Fri Jun 6 09:42:34 2008 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Fri, 6 Jun 2008 09:42:34 +0200 Subject: [sbe-discussion] Re: last of the errata In-Reply-To: <1212684053.5934.4.camel@creeklock> References: <1212684053.5934.4.camel@creeklock> Message-ID: <0EB404C3-EECC-455C-A914-D7A08D6D860C@iam.unibe.ch> Thanks Chris! I will go over them today. - on On Jun 5, 2008, at 6:40 PM, ckasso wrote: > Greetings, > > Page 162 > two kinds of thing > two kinds of things > > Page 164 > then then > then > > Page 165 > for it to be practical to do it once > > for it to be practical to do once -or- > to be practical to do once > > Page 170 > all the resource > all the resources > > Page 176 > simply write > simply writes > > Page 177 > and this especially true for brace arrays > > and this is especially true for brace arrays -or- > and especially for brace arrays > > examples shows > examples show > > Page 178 > Method 8.4: > Method 8.4: Object equality > > Page 182 > in you program > in your program > > Page 194 > Figure 9.1: The collection classes in Squeak. Indentation indicates > subclass- > ing; Italicized classes are abstract. > > -add- Classes in bold made up the collection and stream classes of > Smalltalk-80 > as described by the "Blue Book". > > Page 197 > method provide by > method provided by > > Page 199 > relize > realize > they do interpret > they do, interpret > suggest you to browse > suggest you browse > > Page 209 > integers or block > integers or blocks > > Page 210 > gives also access > also gives access > on Number > in class Number > > Page 214 > is to using xor: > is to use xor: > > Page 217 > Stream Streams > Streams > > Page 221 > If you want to go to the beginning or at the end is what you want, > you can use reset or setToEnd. > > To position to the beginning of a stream you can use reset. > setToEnd positions > > Page 236 > through mouse or the keyboard > through the mouse or the keyboard > mouse events, it you cannot > mouse events, you cannot > > Page 247 > and redefining > and redefine > > Page 255 > Figure 12.3: The metaclasses of Translucent its superclasses > > Figure 12.3: The metaclasses of Translucent and its superclasses > > Chris > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From oscar at iam.unibe.ch Fri Jun 6 12:11:48 2008 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Fri, 6 Jun 2008 12:11:48 +0200 Subject: [sbe-discussion] Re: last of the errata In-Reply-To: <1212684053.5934.4.camel@creeklock> References: <1212684053.5934.4.camel@creeklock> Message-ID: Hi Chris, Which version of the book do these errata apply to? I see some have already been fixed (p 164 "then then"). Cheers, - on On Jun 5, 2008, at 6:40 PM, ckasso wrote: > Greetings, > > Page 162 > two kinds of thing > two kinds of things > > Page 164 > then then > then > > Page 165 > for it to be practical to do it once > > for it to be practical to do once -or- > to be practical to do once > > Page 170 > all the resource > all the resources > > Page 176 > simply write > simply writes > > Page 177 > and this especially true for brace arrays > > and this is especially true for brace arrays -or- > and especially for brace arrays > > examples shows > examples show > > Page 178 > Method 8.4: > Method 8.4: Object equality > > Page 182 > in you program > in your program > > Page 194 > Figure 9.1: The collection classes in Squeak. Indentation indicates > subclass- > ing; Italicized classes are abstract. > > -add- Classes in bold made up the collection and stream classes of > Smalltalk-80 > as described by the "Blue Book". > > Page 197 > method provide by > method provided by > > Page 199 > relize > realize > they do interpret > they do, interpret > suggest you to browse > suggest you browse > > Page 209 > integers or block > integers or blocks > > Page 210 > gives also access > also gives access > on Number > in class Number > > Page 214 > is to using xor: > is to use xor: > > Page 217 > Stream Streams > Streams > > Page 221 > If you want to go to the beginning or at the end is what you want, > you can use reset or setToEnd. > > To position to the beginning of a stream you can use reset. > setToEnd positions > > Page 236 > through mouse or the keyboard > through the mouse or the keyboard > mouse events, it you cannot > mouse events, you cannot > > Page 247 > and redefining > and redefine > > Page 255 > Figure 12.3: The metaclasses of Translucent its superclasses > > Figure 12.3: The metaclasses of Translucent and its superclasses > > Chris > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From ckasso at sprynet.com Fri Jun 6 17:48:58 2008 From: ckasso at sprynet.com (ckasso) Date: Fri, 06 Jun 2008 11:48:58 -0400 Subject: [sbe-discussion] Re: last of the errata In-Reply-To: References: <1212684053.5934.4.camel@creeklock> Message-ID: <1212767338.6314.3.camel@creeklock> On Fri, 2008-06-06 at 12:11 +0200, Oscar Nierstrasz wrote: > Hi Chris, > > Which version of the book do these errata apply to? > > I see some have already been fixed (p 164 "then then"). > > Cheers, > - on > Hello Oscar, At one point I was using the latest version but looking now I see that I have Version of 2007-09-13. I'll go over them if you haven't already. Chris From oscar at iam.unibe.ch Sat Jun 7 21:24:04 2008 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Sat, 7 Jun 2008 21:24:04 +0200 Subject: [sbe-discussion] Re: last of the errata In-Reply-To: <1212767338.6314.3.camel@creeklock> References: <1212684053.5934.4.camel@creeklock> <1212767338.6314.3.camel@creeklock> Message-ID: <921A0C0B-85B1-4F22-9020-D432744DE483@iam.unibe.ch> Hi Chris, I figured out it was that version. I just ignored the few errata that had already been fixed. Just got to upload them when I am back online. (Writing this email offline.) Thanks again for all the corrections! I thought I had done a good job of copy-editing the book, but I am embarrassed to see how many errors squeaked through! Cheers, - on On Jun 6, 2008, at 5:48 PM, ckasso wrote: > On Fri, 2008-06-06 at 12:11 +0200, Oscar Nierstrasz wrote: >> Hi Chris, >> >> Which version of the book do these errata apply to? >> >> I see some have already been fixed (p 164 "then then"). >> >> Cheers, >> - on >> > > Hello Oscar, > > At one point I was using the latest version but looking > now I see that I have Version of 2007-09-13. I'll go over > them if you haven't already. > > Chris > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion