From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: Does anyone have an applicable struct example Date: Tue, 29 Jun 2010 10:16:07 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6475866ece62a048a21d13f X-Trace: dough.gmane.org 1277777978 31712 80.91.229.12 (29 Jun 2010 02:19:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2010 02:19:38 +0000 (UTC) Cc: guile-user@gnu.org To: Tristan Colgate Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 29 04:19:36 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OTQPw-0000yj-9S for guile-user@m.gmane.org; Tue, 29 Jun 2010 04:19:36 +0200 Original-Received: from localhost ([127.0.0.1]:43635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTQPi-0003bk-4S for guile-user@m.gmane.org; Mon, 28 Jun 2010 22:19:06 -0400 Original-Received: from [140.186.70.92] (port=34391 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTQNT-0002nO-Cq for guile-user@gnu.org; Mon, 28 Jun 2010 22:19:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTQMr-00041L-KW for guile-user@gnu.org; Mon, 28 Jun 2010 22:16:10 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:35074) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTQMr-00041C-Go for guile-user@gnu.org; Mon, 28 Jun 2010 22:16:09 -0400 Original-Received: by vws1 with SMTP id 1so2573489vws.0 for ; Mon, 28 Jun 2010 19:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=itUohVxaRyJ2DK5tSaxvLHNPyG6bzY1mFrjhII4SAts=; b=Qsts+eX98rTNEPmEnErIP0ORgort5AF8p3AHSii9r0IqCsSPaIYS/7g/f6dtN7OWMI gpheHJuL8dv6oBHQNgsIDoWXPvmlcgYUtcsrP0y8qiJEC/R/w+dfSzXSJzpd5SmLWt8t czUO5WeFE05JuYGcmIbcuewtSlWnTi1AgFd0o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UI4fF0HS0AGEnaih3ADrixA48PeV++2i12QPHZIOTKlqe+ZGKbEGszW8e8PcJpGd8a GZje2eUKCaDaxsFLgobKDDvMBNapi8/PXzRT+gr4VPPY/nnJGlx/8DZPcvJl9siKoa0T +wSMcoRFe4R+ehCD4e2NpxZ4rqLT4yYgZIvGc= Original-Received: by 10.220.161.201 with SMTP id s9mr3426626vcx.277.1277777767359; Mon, 28 Jun 2010 19:16:07 -0700 (PDT) Original-Received: by 10.220.106.14 with HTTP; Mon, 28 Jun 2010 19:16:07 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7933 Archived-At: --0016e6475866ece62a048a21d13f Content-Type: text/plain; charset=UTF-8 2010/6/25 Tristan Colgate > scheme@(guile-user)> (use-modules (oop goops)) > scheme@(guile-user)> (define-class ()) > scheme@(guile-user)> (make #:procedure (lambda()(display > "some code")(nelwine))) > :5:58: warning: possibly unbound variable `nelwine' > Throw to key `unbound-variable': > ERROR: In procedure module-lookup: > ERROR: Unbound variable: set-object-procedure! > > I tried using a generic instead but it didn't make much difference. > > What am I doing wrong? > > NOT "nelwine" IT IS "newline" --0016e6475866ece62a048a21d13f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

2010/6/25 Tristan Colgate <tcolgate@gmail.com>
scheme@(guile-user)> (use-modules (oop goops))
scheme@(guile-user)> (define-class <myclass> (<applicable-struc= t>))
scheme@(guile-user)> (make <myclass> #:procedure (lambda()(display=
"some code")(nelwine)))
<stdin>:5:58: warning: possibly unbound variable `nelwine'
Throw to key `unbound-variable':
ERROR: In procedure module-lookup:
ERROR: Unbound variable: set-object-procedure!

I tried using a generic instead but it didn't make much difference.

What am I doing wrong?


NOT "nelwine" IT IS "newline"= ;

--0016e6475866ece62a048a21d13f--