[squeak-dev] #perform:withArguments: not working with WeakArray
marcel.taeumel
Marcel.Taeumel at hpi.de
Thu Apr 28 14:10:01 UTC 2016
Hey, there!
This does not work (i.e. primitive failed):
m := Morph new.
c := Color white.
m perform: #color: withArguments: (WeakArray with: c).
Is this primitive-fail okay? If yes, we have a bug in WeakMessageSend >>
#collectArguments: because it will always return a WeakArray if the arg
sizes does not match. Usually a normal array otherwise.
I observed this kind of bug when using our object events like this:
m1 := Morph new.
m2 := Morph new.
m1 when: #baz send: #color: to: m2 with: Color black.
m1 triggerEvent: #baz withArguments: {Color white. #blubb}. "fails due to
weak array"
m1 triggerEvent: #baz withArguments: {Color white}. "works due to normal
array"
Best,
Marcel
--
View this message in context: http://forum.world.st/perform-withArguments-not-working-with-WeakArray-tp4892693.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|