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 _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On Wed, 19 May 2010 16:34:14 -0700, Rick Flower <[hidden email]>
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! _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On Wed, 19 May 2010 16:47:58 -0700, Rick Flower <[hidden email]>
wrote: > On Wed, 19 May 2010 16:34:14 -0700, Rick Flower <[hidden email]> > 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 [ ] When I run my script I get the following : Recompiling classes... Recompiling class: PositionableStream Recompiling selector: #peek Recompiling selector: #readStream Recompiling selector: #close Recompiling selector: #copyFrom:to: Recompiling selector: #contents Recompiling selector: #isEmpty Recompiling selector: #position Recompiling selector: #peekFor: Recompiling selector: #position: Recompiling selector: #reset Recompiling selector: #size Recompiling selector: #skip: Recompiling selector: #species Recompiling selector: #upToEnd Recompiling selector: #upTo: Recompiling selector: #reverseContents Recompiling selector: #basicAtEnd Recompiling selector: #basicPosition: Recompiling selector: #truncate Recompiling selector: Segmentation fault (core dumped) core 'core' of 5788: /export/home/rickf/gst/bin/gst -f ./test.st ff2afdd8 _gst_mark_an_oop_internal (fac0e1e8, eaa4a924, eaa4a940, 0, 0, 0) ff2afec8 _gst_mark_an_oop_internal (fac0e598, eaa4a8c4, eaa4a8e8, 0, 0, 0) + f0 ff2afec8 _gst_mark_an_oop_internal (fac0e828, eaa4a864, eaa4a890, 0, 0, 0) + f0 ff2afec8 _gst_mark_an_oop_internal (fac0f230, eaa4a804, eaa4a824, 0, 0, 0) + f0 ff2afec8 _gst_mark_an_oop_internal (fac0f6c0, eaa4a7a4, eaa4a7c8, 0, 0, 0) + f0 ff2afec8 _gst_mark_an_oop_internal (fac0f998, eaa4a744, eaa4a760, 0, 0, 0) + f0 ff2afec8 _gst_mark_an_oop_internal (fac0fcd0, eaa4a6e4, eaa4a708, 0, 0, 0) + f0 ff2afec8 _gst_mark_an_oop_internal (fac0ff58, eaa4a684, eaa4a6b0, 0, 0, 0) + f0 . . . ff2afec8 _gst_mark_an_oop_internal (fadae6b8, eb470984, eb4709a0, a7, ff36a298, 2) + f0 ff2b2090 _gst_global_gc (0, 0, 0, 0, 0, 0) + 168 ff2b2a4c _gst_scavenge (0, ea83efb4, 10040, ff366540, 67dca8, 70000000) + 88 ff2f10b4 _gst_send_message_internal (0, 0, 9, fac1bc58, 11f0, ebc) + 878 ff2fd27c _gst_interpret (1208, 1fc4, ff2fd220, 1de8, 1fbc, 2080) + 82f0 ff301864 _gst_nvmsg_send (fac47748, fac082f0, ffbeecfc, 1, 2c, ffbeed49) + 188 ff2d433c _gst_va_msg_sendf (ffbeef2c, ff32a808, ffbeef1c, ff2d4b4c, ffbeecf8, ffbeecf8) + 264 ff2d4c44 _gst_msg_sendf (ffbeef2c, ff32a808, fac47748, 38b800, 3a000000, 3a000000) + 20 ff2970b8 parse_doit (ffbef030, 0, 0, 4, 88, ffbef108) + 480 ff297684 parse_chunks (ffbef030, ff2979b4, 0, 0, 0, 204) + dc ff297a00 _gst_parse_chunks (1, fe8, 7, ff2da2d4, ff2da224, 0) + 18c ff298168 _gst_parse_stream (0, 37ad58, ff2e67d4, ff331da0, 2183c, ff217a80) + 68 ff2cdba8 _gst_process_file (ffbef464, 0, a, 0, 2e2f7263, 2d000000) + 88 00011614 main (4, ffbef2e4, ffbef2f8, 251e4, 0, 0) + 150 00010db8 _start (0, 0, 0, 0, 0, 0) + 5c _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On Thu, May 20, 2010 at 03:19, Rick Flower <[hidden email]> wrote:
> On Wed, 19 May 2010 16:47:58 -0700, Rick Flower <[hidden email]> > wrote: >> On Wed, 19 May 2010 16:34:14 -0700, Rick Flower <[hidden email]> >> 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 [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
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 <[hidden email]> wrote: > On Thu, May 20, 2010 at 03:19, Rick Flower <[hidden email]> > wrote: >> On Wed, 19 May 2010 16:47:58 -0700, Rick Flower <[hidden email]> >> wrote: >>> On Wed, 19 May 2010 16:34:14 -0700, Rick Flower <rickf@ca- >>> 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 _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On Thu, May 20, 2010 at 18:04, Rick Flower <[hidden email]> wrote:
> 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.. #upToAll: is implemented in Stream, so it is usable in either Stream or PeekableStream or PositionableStream or anything else. :-) Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On Thu, 20 May 2010 19:00:05 +0200, Paolo Bonzini <[hidden email]> wrote:
> On Thu, May 20, 2010 at 18:04, Rick Flower <[hidden email]> wrote: >> 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.. > > #upToAll: is implemented in Stream, so it is usable in either Stream > or PeekableStream or PositionableStream or anything else. :-) Thanks Paolo.. In looking at both GST 3.1 and 3.2 I see that the PositionableStream class is in fact implemented.. Go figure! I'm not sure what I must have been searching for yesterday as I didn't see if when I looked.. Perhaps I had a brain fart and was looking for something like "PositionalStream" which is wrong.. Oh well.. I'll calm down next time and do a more thorough search!! _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Free forum by Nabble | Edit this page |