RE: [Newbies] Re: new and initialize

2016-05-10 Thread Ron Teitelbaum
From: Joseph Alotta Sent: Tuesday, May 10, 2016 3:38 PM > On May 10, 2016, at 12:45 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> > wrote: > > Hi Joe, > > Excellent question. Try this. > > Object new. > > Highlight it and do debug it. Click "Into" to go into the

[Newbies] Re: next or break in a loop

2016-05-10 Thread Joseph Alotta
> On May 10, 2016, at 12:03 PM, Louis LaBrunda [via Smalltalk] > wrote: > > Joe, > > At each test for the type of data you can also test to see if you found type, > something like > this: > > stream := ReadStream on: myCollection. >

RE: [Newbies] new and initialize

2016-05-10 Thread Ron Teitelbaum
Hi Joe, Excellent question. Try this. Object new. Highlight it and do debug it. Click "Into" to go into the #new method. Notice the implementation of #new. You should be able to see there that #initialize is called automatically. Also for extra points notice what class new is

[Newbies] next or break in a loop

2016-05-10 Thread Louis LaBrunda
Joe, At each test for the type of data you can also test to see if you found type, something like this: stream := ReadStream on: myCollection. [stream atEnd] whileFalse: [:item | | notFound | item := stream next. notFound := true.

[Newbies] Re: next or break in a loop

2016-05-10 Thread Joseph Alotta
Lou, I was trying to use the ReadStream, but the issue is to get execution to go back to the top. If I send the upToEnd message, it still executes from the same line and goes through the rest of the tests. Sincerely, Joe. > On May 9, 2016, at 3:56 PM, Louis LaBrunda [via Smalltalk] >