[squeak-dev] A case where Morph copying fails

karl ramberg karlramberg at gmail.com
Sat Aug 13 06:26:39 UTC 2022


Hi,
I think this is a possible work around

'From Squeak6.1alpha of 11 August 2022 [latest update: #22154] on 13 August
2022 at 8:22:23 am'!

!PasteUpMorph methodsFor: 'copying' stamp: 'kfr 8/13/2022 08:21'!
veryDeepCopyWith: deepCopier
"See storeDataOn:"

^ self isWorldMorph
ifTrue: [self] "never copy the World"
ifFalse: [model := nil. "model will self initialize if needed"
super veryDeepCopyWith: deepCopier]! !

Best,
Karl

On Fri, Aug 12, 2022 at 11:36 PM karl ramberg <karlramberg at gmail.com> wrote:

> It seems PasteUpMorphs sometimes installs a model.
> That model causes the DNU when copied.
>
> Best,
> Karl
>
> On Fri, Aug 12, 2022 at 8:26 PM karl ramberg <karlramberg at gmail.com>
> wrote:
>
>> Weird bug.
>> I got a DNU once, and looked at the issue in the debugger.
>> I tried a second time and now I can't reproduce it.
>> Is there some state in the image that is not initialized ??
>>
>> Side note: A holder can only be found in Supplies flap as far as I know.
>> To test the issue one must show the Supplies flap.
>>
>> Best,
>> Karl
>>
>>
>> On Thu, Aug 11, 2022 at 5:10 PM Tim Johnson <digit at sonic.net> wrote:
>>
>>> Hi all,
>>>
>>> Fresh 6.0 image --
>>>
>>> 1) drag out a Holder from Supplies flap
>>> 2) drag out a Rectangle from Supplies flap
>>> 3) drop Rectangle into Holder  (note the Rectangle border becomes
>>> extra thick)
>>> 4) open a Halo over the Holder
>>> 5) try to click on the Green "copy/duplicate" button
>>> 6) get a DNU/MNU: MorphicModel1(Object) doesNotUnderstand:
>>> #copyUniClassWith:
>>>
>>> Last time I tried this, it actually behaved differently.  It was more
>>> like this:
>>>
>>> 1) Drag out a Holder
>>> 2) Drag out a Rectangle
>>> 3) Drop the Rectangle into the Holder
>>> 4) Copy the Holder using the Halo green copy/duplicate (this would work)
>>> 5) change the color of the embedded Rectangle via its inspector
>>> 6) Try to copy the Holder now (this would fail, again via #veryDeepCopy)
>>>
>>> It's also a little strange that the first Rectangle dropped into the
>>> Holder sees its border become thicker, while a second / third
>>> Rectangle do not see their border width change.
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220813/80e65525/attachment.html>


More information about the Squeak-dev mailing list