From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: tomas@fabula.de Newsgroups: gmane.lisp.guile.user Subject: Re: [Fwd: Req for help on objects and environments] Date: Thu, 2 Sep 2004 13:53:16 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20040902115316.GB30187@www> References: <1094123345.4412.5.camel@kuzgun> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1821852599==" X-Trace: sea.gmane.org 1094126021 21565 80.91.224.253 (2 Sep 2004 11:53:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Sep 2004 11:53:41 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Sep 02 13:53:33 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C2q9k-0000nG-00 for ; Thu, 02 Sep 2004 13:53:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2qEi-0000qw-Cy for guile-user@m.gmane.org; Thu, 02 Sep 2004 07:58:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C2qEd-0000oO-8e for guile-user@gnu.org; Thu, 02 Sep 2004 07:58:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C2qEb-0000nP-Ee for guile-user@gnu.org; Thu, 02 Sep 2004 07:58:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2qEb-0000nM-A5 for guile-user@gnu.org; Thu, 02 Sep 2004 07:58:33 -0400 Original-Received: from [217.22.192.104] (helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C2q9W-0003oX-4N for guile-user@gnu.org; Thu, 02 Sep 2004 07:53:18 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5002) id 0FACE144D9; Thu, 2 Sep 2004 13:53:17 +0200 (CEST) Original-To: Alp =?iso-8859-1?Q?=D6ztarhan?= In-Reply-To: <1094123345.4412.5.camel@kuzgun> User-Agent: Mutt/1.5.3i 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: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3424 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3424 --===============1821852599== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 02, 2004 at 02:09:05PM +0300, Alp ?ztarhan wrote: > Maybe I should give more information: >=20 > 1) I work on gentoo linux guile 1.6.4 >=20 > 2) I try to program in Scheme. I DO NOT use C or C++ in my project. > Just pure Scheme. >=20 > 3) I try to control the environment I "eval" my expression, but > manipulating the environment is not described in my documentation. > (which comes with guile-1.6.4) AFAIK eval takes an expression and a module (which is an environment) to eval the expression in. I don't quite understand your problem. Could you give some examples? > 4) I also want to use the (make-object-property) scheme procedure. > Unfortunately, I cannot list the properties of a given object. Like this? | guile> (define x 42) | guile> (set-object-property! x 'colour 'green) | green | guile> (set-object-property! x 'size 42) | 42 | guile> (set-object-property! x 'friends '(alfred bert carol)) | (alfred bert carol) | guile> (object-properties x) | ((friends alfred bert carol) (size . 42) (colour . green)) | guile> (object-property x 'friends) | (alfred bert carol) (note that the object properties is an alist, the key being the car of the sublists, the value the cdr. But you can (and usually should) ignore that and use object-property, object-properties and so on). (Note as well that the properties get attached to the *value*, not to the *variable*): | guile> (object-property 42 'friends) | (alfred bert carol) Does this help? Regards -- tom=E1s --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBNwmeBcgs9XrR2kYRAhNDAJ9KopW65+TreJs1/xQiomiuBGLvpACfUNrn XtTg3+L3pqmg3H+7GmOukAI= =uKBy -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv-- --===============1821852599== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user --===============1821852599==--