#flatCollect:. In my case, the variable 'attributes' is of type
http://damiencassou.seasidehosting.st
FAMIXType>>incomingAccesses
^ self privateState
cacheAt: #incomingAccesses
ifAbsentPut: [ attributes flatCollect: [ :each | each
incomingAccesses ] ]
Hi,
in this method
when the cache is empty, it is initialized with the result of
FMMultivalueLink. When sending #flatCollect: to a
FMMultiValueLink, the result is an OrderedCollection (because
FMMultiValueLink>>#species returns OrderedCollection). This means
that it is no more possible to
update the list of incomingAccesses.
Is that the desired behavior?
In my case, this behavior triggers a bug. When the following
method is
FMMultiValueLink class>>on: element update: selector from: old
to: new
"refresh the other side of the relations to reflect change in
value"
old ~= new ifTrue: [
old notNil ifTrue: [ (old perform: selector) unsafeRemove:
element ].
new notNil ifTrue: [ (new perform: selector) unsafeAdd:
element ]].
^ new
executed while importing a mse, I get a DNU:
This is because the (new perform: selector) expression returns an
OrderedCollection that does not understand #unsafeAdd: (selector
equals
to #incomingAccesses).
Could somebody help me please?
-- Damien Cassou
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill