On Thu, May 20, 2010 at 03:19, Rick Flower <[email protected]> wrote:
> On Wed, 19 May 2010 16:47:58 -0700, Rick Flower <[email protected]>
> wrote:
>> On Wed, 19 May 2010 16:34:14 -0700, Rick Flower <[email protected]>
>> 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

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to