CLIM mail archive

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

accept-from-string within accept methods



    Date: Mon, 6 Jul 1992 22:11+0100
    From: Curt Eggemeyer <unido!eraserhead.jpl.nasa.gov!curt>

    I can't seem to get accept-from-string calls within my accept method to work
    in cases where I do a regular accept. 
    If I do an accept-from-string  call my accept method will work.
    It seems that there is a stream sharing going on between the accept method and my accept-from-string calls
    within it, because my accept-from-string always gets passed nil even though I
    am passing a substring of what I got from the read-token. How can one get around this problem?

You should really provide examples, otherwise it's hard to understand your problem.
Anyway:

(define-presentation-type foo ())

Do you mean sth like this(?):
(define-presentation-method accept ((type foo) stream view &key)
	..
	(accept-from-string 'integer stream)
	..)
assuming always calling (accept-from-string 'foo "123456").
Even if this would work the way you expect, this is against the intention
of accept of working with all kinds of streams.

Probably you mean:
(define-presentation-method accept ((type foo) stream view &key)
	..
	(accept-from-string 'integer (read-token stream))
	..)
which works fine for me (on Symbolics CLIM 1.1)

Markus Fischer, MF@SGER.UUCP              Mergenthaler Allee 77-81
Consulting Services                       W-6236 Eschborn, Germany
Symbolics Systemhaus GmbH                 Phone: +49 6196 47220, Fax 481116


References:

Main Index | Thread Index