Hi.
I have an issue with viewing a case in remote magma setup. While in local magma setup all works just fine (in single image), but when i starting two images i got DNU's like: MessageNotUnderstood: UndefinedObject>>key
it appears in Q2AssociationField>>renderViewControlOn: html component: fc because cache is nil. I investigated a problem and found, that field unable to read a value from case instance and returns nil values as default (so fieldcomponent case = nil).
By placing a break in Q2AssociationField>>valueFromTarget: aTarget ifAbsent: aBlock
and tracing it, i found that accessor is unable to send message to case instance because it returns false from #respondsTo: message.
What is more strange is, that this happens following code to break:
Q2SelectorAccessor>>valueFromTarget: aTarget ifAbsent: aBlock ^ (aTarget respondsTo: selector) ifTrue: [ aTarget perform: selector ] ifFalse: [ self break. aBlock value ]
while aTarget is Q2Case instance and selector = #responsibleUserAndRole.
And by entering in debugger and evaluating aTarget respondsTo: selector is returns true!!!
I think something is wrong with maMutatingProxy when accessor object first time used to get value, its still is mutating proxy object and uses: #mutateAndSend: message. And something not working in this context. After mutating everything works ok, but what makes Q2Case instance respond false to first #respondsTo: message? I will continue debugging trying to figure out.. Maybe a 'selector' ivar in Q2SelectorAccessor is not reified correctly..
Btw, Levente i downloaded image from test2 (MagmaCounter.1.image), which you saying 'works fine'.. And guess what? It not working. So, please, confirm an issue or explain, what im doing wrong?? :)
i found a way around of issue with following code:
valueFromTarget: aTarget ifAbsent: aBlock selector yourself. ^ (aTarget respondsTo: selector) ifTrue: [ aTarget perform: selector ] ifFalse: [ aBlock value ]
I think setting proper readStrategy for Q2FieldAccessor to reify all ivars before using them will fix this.
I think setting proper readStrategy for Q2FieldAccessor to reify all ivars before using them will fix this.
... but dealing setting readStrategy we should deal with setting readStrategy issue first. I think we need to refactor the code and use standard magma readstrategy class for it. Because using custom readstrategy class not works with remote setup.
see Q2Session>>updateReadStrategy
setools@lists.squeakfoundation.org