[gambit-list] Compiling Meroon objects and initializers

Mikael mikael.rcv at gmail.com
Sat Jul 9 04:07:16 EDT 2011


Hi,

As for the error you encountered, can you please do ,be in the REPL to see
exactly what it is that failed.

Regarding how to make it work with a compiled file, can you please clarify
what you mean by making it to work with a compiled file - i.e., what is it
you are trying to achieve, and what part of it is it that you don't get to
work currently?

Brgds,
Mikael

2011/7/9 Roger Wilson <misterrogerwilson at gmail.com>

> Hi,
>
> I have a basic Scheme question.
>
> The following works as intended from my Swank REPL.  How do I make it work
> with a compiled file?  I'm trying to create a Meroon object that has an
> automatically created unique id each time one is created.
>
> (define *global-id* 0)
> (define (get-next-global-id)
>     (let ((current-global-id *global-id*))
>          (set! *global-id* (+ *global-id* 1))
>          current-global-id))
>
> (define-class my-object Object
>   ((= object-id :initializer get-next-global-id)))
>
>
> When the Gambit setup function runs I get the error....
>
> *** ERROR IN | object| -- (Argument 1) NUMBER expected
> (= #!unbound #!unbound 'get-next-global-id)
>
>
> Roger.
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20110709/35f57bf6/attachment.htm>


More information about the Gambit-list mailing list