From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Clinton Ebadi Newsgroups: gmane.lisp.guile.user Subject: Re: GOOPS %modify-[instance|class] Date: Sun, 12 Jan 2003 16:45:09 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <200301121645.09362.clinton@unknownlamer.org> References: <200301082151.59431.clinton@unknownlamer.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1042407757 14112 80.91.224.249 (12 Jan 2003 21:42:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2003 21:42:37 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18XpsI-0003fS-00 for ; Sun, 12 Jan 2003 22:42:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18XpsN-0004NY-05 for guile-user@m.gmane.org; Sun, 12 Jan 2003 16:42:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18Xprw-0003zo-00 for guile-user@gnu.org; Sun, 12 Jan 2003 16:42:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Xpra-0002wR-00 for guile-user@gnu.org; Sun, 12 Jan 2003 16:41:55 -0500 Original-Received: from pop018pub.verizon.net ([206.46.170.212] helo=pop018.verizon.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18XprH-0001zS-00 for guile-user@gnu.org; Sun, 12 Jan 2003 16:41:32 -0500 Original-Received: from vsynth ([151.196.171.253]) by pop018.verizon.net (InterMail vM.5.01.05.09 201-253-122-126-109-20020611) with ESMTP id <20030112214129.QIOI4558.pop018.verizon.net@vsynth>; Sun, 12 Jan 2003 15:41:29 -0600 Original-Received: from clinton by vsynth with local (Exim 3.35 #1 (Debian)) id 18Xpuo-0004t1-00; Sun, 12 Jan 2003 16:45:10 -0500 Original-To: djurfeldt@nada.kth.se User-Agent: KMail/1.4.2 In-Reply-To: X-Authentication-Info: Submitted using SMTP AUTH LOGIN at pop018.verizon.net from [151.196.171.253] at Sun, 12 Jan 2003 15:41:29 -0600 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1545 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1545 On Friday 10 January 2003 05:12, Mikael Djurfeldt wrote: > Clinton Ebadi writes: > > I think %modify-instance and -class should be public. > > Could you be more specific why? These seem pretty strange and magical > to me, and might change as the implementation evolves... They swap the class in place. It seems that if I don't do that then all o= f my=20 objects that point to the class being changed remain being part of that c= lass=20 and then only new objects can be created with the changed class. My=20 understanding of the MOP is a bit fuzzy so I'm probably wrong. > > I specialized change-class and change-object-class (to the same > > thing, just to be safe because the manual says either one may be > > called but not both). > > The manual shouldn't mention change-object-class since that is a > private part of the implementation. BTW, change-class is a generic > function while change-object-class is a prociedure. See the GOOPS Manual, Mop Specification, Class Redefinition. It says "[*f= ixme*=20 Actually it sometimes calls change-class and sometimes change-object-clas= s,=20 and I don't understand why.]"=20 > > > I seem to have a problem: when I return the updated class, all my > > pointers to the old class are invalidated! And then it seems that > > GOOPS continues in an infinite loops updated the same objects over > > and over again. > > Could you please explain what you want to do. You talk about > returning an updated class. But this only happens if one is using > change-class to change the metaclass of a class instance. The normal > job for change-class is to change the class of an instance. I meant an instance (sorry about that). > Could you please give me enough information to reproduce the infinite > loop you are talking about? My code is at http://unknownlamer.org/files/temp/serialize.scm (it has ot= her=20 problems and after I get the class redefinition to work it still won't wo= rk=20 but I'd just have to do one more thing). I modified it and now it says sl= ot=20 'object is unbound (I marked the line this happens at in the source). I=20 didn't want anyone to see it because the code is a bit of a hack and=20 sucks...(sorry for taking so long to reply but I've had to put in really = long=20 shifts at work the last few days) --=20 http://unknownlamer.org _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user