help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Is PeekableStream available in 3.1?


From: Rick Flower
Subject: Re: [Help-smalltalk] Is PeekableStream available in 3.1?
Date: Thu, 20 May 2010 09:04:11 -0700

Paolo,

The reason I was subclassing that class was to add in the missing (at least in gst 3.1) PositionableStream class so I could use the upToAll method on a pipe..

On May 20, 2010, at 12:37 AM, Paolo Bonzini <address@hidden> wrote:

On Thu, May 20, 2010 at 03:19, Rick Flower <address@hidden> wrote:
On Wed, 19 May 2010 16:47:58 -0700, Rick Flower <address@hidden>
wrote:
On Wed, 19 May 2010 16:34:14 -0700, Rick Flower <address@hidden flower.com>
wrote:
I see it sitting in the kernel directory but when I try to use it
for subclassing, I get the following complaint :

key PeekableStream not found

In looking at it further I believe it's related to the
namespace it's sitting in (kernel) whereas the regular
Stream class has no namespace reference.. I guess I'll
have to see how to get into the kernel namespace for
my subclass.. Time to RTFM!

I'm now referring to build 3.2 (but 3.1 shows the same
issue)..

Ok.. Did the RTFM thing and found that if I add "Kernel."
to the front of the PeekableStream reference that I get
further but not without a core dump.. Below is the sub
class I'm working on -- it doesn't seem to matter whether
I've defined any methods or not -- the result is the same:

Kernel.PeekableStream subclass: PositionableStream [

]

The core dump is obviously not expected.

However, the PeekableStream is in "Kernel" because you're not supposed
to refer to it.

Whenever you send #peek to a Stream that doesn't implement it itself
(and PositionableStreams do), it is transformed behind the scenes to a
PeekableStream.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]