[elephant-devel] changing association slots

Ian Eslick eslick at media.mit.edu
Tue Jul 29 13:57:55 UTC 2008


Thanks, I'll look at this when I get a chance.

Ian

On Jul 29, 2008, at 9:41 AM, LukasGiessmann wrote:

> i forgot to attach the patch to the mail - so other users - if they  
> have
> the same problem - will be able to compare the current source with our
> patch.
>
>
> regards
>
> lukas
>
>
>
>> hi,
>>
>> while we were working on the problem "associations between  
>> instances of
>> the same class" we also were trying to solve the remove-association
>> problem.
>>
>> we have a suggestion - it differs a little from the original way, but
>> maybe it is helpful.
>>
>> so i sent a patch today.
>>
>>
>> regards
>>
>> lukas
>>
>>
>>> I was getting too much spam so require authentication on the Trac
>>> now.  The admins can be slow to grant accounts or enable Trac.  If  
>>> you
>>> send me a report directly on e-mail I'll add it for you.
>>>
>>> Ian
>>>
>>> On Jul 9, 2008, at 3:55 PM, LukasGiessmann wrote:
>>>
>>>> Hi Ian,
>>>>
>>>> I know this is not the right space to place this question butI don 
>>>> ´t
>>>> know
>>>> were else I should do it.
>>>> Tried to get an account for http://trac.common-lisp.net/elephant; I
>>>> wrote
>>>> a mail to admin at common-lisp.net but haven´t got an answer yet.
>>>> Is there another possibility to mark this bug?
>>>>
>>>> Best regards
>>>> Lukas
>>>>
>>>>> I haven't looked at that code in a bit, but I suspect that the  
>>>>> right
>>>>> thing happens if you just remove the association definition from
>>>>> defclass and reevaluate the defclass form.  Can you mark this as a
>>>>> bug
>>>>> in elephant so I can remember to look into it later?
>>>>>
>>>>> Thank you,
>>>>> Ian
>>>>>
>>>>> On Jul 4, 2008, at 4:24 AM, LukasGiessmann wrote:
>>>>>
>>>>>> hello,
>>>>>>
>>>>>> since our last mail working with associations turned out to go  
>>>>>> quite
>>>>>> well
>>>>>> but one more problem came up:
>>>>>> i tried to change the associations by removing it and replacing  
>>>>>> it
>>>>>> by a
>>>>>> new association. but the function "remove-association" only works
>>>>>> partially.
>>>>>>
>>>>>> 1. in this one-to-one association the function doesn't work at  
>>>>>> all.
>>>>>> ---
>>>>>> (defpclass job()
>>>>>> ((title :initarg :title :accessor title-of :index t)
>>>>>> (company :initarg :company :accessor company-of :index t)
>>>>>> (job-holder :initarg :job-holder :accessor job-holder- 
>>>>>> of :associate
>>>>>> person)))
>>>>>>
>>>>>> (defpclass person()
>>>>>> ((name :initarg :name :accessor name-of :index t)
>>>>>> (job :initarg :job :accessor job-of :associate job)))
>>>>>> ---
>>>>>>
>>>>>> an error message shows up:
>>>>>>
>>>>>> (remove-association *job1* 'job-holder *person1*) ; -> There is  
>>>>>> no
>>>>>> applicable method for the generic function  #<STANDARD-GENERIC-
>>>>>> FUNCTION
>>>>>> ELEPHANT::OID (1)> when called with arguments (NIL).
>>>>>>
>>>>>> same thing happens when i use the following statement:
>>>>>> (setf (job-holder-of *job1*) nil)
>>>>>>
>>>>>>
>>>>>> 2. by one-to-many associations generally nothing happens at all.
>>>>>> ---
>>>>>> (defpclass job()
>>>>>> ((title :initarg :title :accessor title-of :index t)
>>>>>> (company :initarg :company :accessor company-of :index t)
>>>>>> (job-holders :accessor job-holders-of :associate (person job))))
>>>>>>
>>>>>> (defpclass person()
>>>>>> ((name :initarg :name :accessor name-of :index t)
>>>>>> (job :initarg :job :accessor job-of :associate job)))
>>>>>> ---
>>>>>>
>>>>>> it only works in this case:
>>>>>> ---
>>>>>> (drop-instance *person2*)
>>>>>> (remove-association *job2* 'job-holders *person2*)
>>>>>> ---
>>>>>>
>>>>>>
>>>>>> 3. in the case of many-to-many associations everything goes fine.
>>>>>>
>>>>>> how do i get the "remove-association" function to work?
>>>>>> are there other ways for changing associations?
>>>>>>
>>>>>>
>>>>>> thank you for your help
>>>>>>
>>>>>> lukas
>>>>>>
>>>>>> _______________________________________________
>>>>>> elephant-devel site list
>>>>>> elephant-devel at common-lisp.net
>>>>>> http://common-lisp.net/mailman/listinfo/elephant-devel
>>>>>
>>>>> _______________________________________________
>>>>> elephant-devel site list
>>>>> elephant-devel at common-lisp.net
>>>>> http://common-lisp.net/mailman/listinfo/elephant-devel
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> elephant-devel site list
>>>> elephant-devel at common-lisp.net
>>>> http://common-lisp.net/mailman/listinfo/elephant-devel
>>>
>>> _______________________________________________
>>> elephant-devel site list
>>> elephant-devel at common-lisp.net
>>> http://common-lisp.net/mailman/listinfo/elephant-devel
>>>
>>
>>
>> _______________________________________________
>> elephant-devel site list
>> elephant-devel at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/elephant-devel
>>
> <20080729132500- 
> b3c57 
> -23d380f5861ca59388603ca6e0786db5109aea5a 
> .gz>_______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list