[FIX] (Re: [BUG] Wierd resend behavior)

Brian Rice water at tunes.org
Sun Dec 4 14:33:55 PST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Dec 4, 2005, at 1:46 PM, Brian Rice wrote:

>> Slate 5> lobby ensureNamespace: #Graphics &delegate: True.
>> Slate 6> load: 'src/ui/region.slate'.
>> Slate 7> load: 'src/ui/graphics.slate'.
>> Slate 8> load: 'src/ui/transform.slate'.
>> Slate 9> load: 'src/ui/morph.slate'.
>> Slate 10> define: #A &parents: {Morph}.
>> Slate 11> define: #B &parents: {A}.
>> Slate 12> _@(A traits) doSomething
>> [
>>    inform: 'In A doSomething'.
>> ].
>> Slate 13> _@(B traits) doSomething
>> [
>>    inform: 'In B doSomething'.
>>    resend.
>> ].
>> Slate 14> B doSomething.
>> In B doSomething
>> The method #selector: was not found for the following arguments:
>> {("MethodResentNotFound" handlers: {}. exitContinuation: [].  
>> returnContinuation: [].
>>        message: Nil. method: []). #doSomething}
>> Nil
>>
>>
>> This problem doesn't occur if A doesn't derive from Morph.
>
> Okay. There is a simple bug in the specific condition code that the  
> debugger actually signals, and then there's the fact that your  
> resend is throwing an error in the first place.
>
> For the former, I see that my MethodNotFound refactoring to use a  
> Message object instead of storing the selector and arguments  
> directly wasn't carried down to its derivative - big oops there,  
> I'll push up a patch that fixes it and new images.

This is now done. Alpha and the slate-current tarball are now updated.

> As for the latter, the delegation of Morph via #defaultState to  
> DefaultMorphState is probably the problem. Feel free to remove that  
> and set up default morph properties in some other way. Actually, a  
> quicker alternative is to change the addDelegate: line in  
> morph.slate to:
>
> Morph addDelegate: #defaultState after: #defaultState valued:  
> MorphDefaultState.

Oops, that's quite a typo. :) I meant:
Morph addDelegate: #defaultState after: #traitsWindow valued:  
MorphDefaultState.

> Or you could move the delegation up to Morph traits. In any case,  
> the default-state setup is dodgy and feel free to push it out of  
> the way while you're in there as long as progress is being made.
>
> On the other hand, the next method not being found at all is a  
> pretty bad sign. I'll reproduce it here once the new images are  
> done and respond again with hopefully a more definitive answer.

I can confirm. Here are some inspections I did:

Slate 11> #doSomething findOn: {B}.
[doSomething]
Slate 12> #doSomething findOn: {B} after: it.
Nil
Slate 13> #doSomething findOn: {A}.
[doSomething]

If you call Morph removeSlot: #defaultState /before/ the derivation  
calls, the resend problem is resolved. If you change the line in  
morph.slate to:

Morph addDelegate: #defaultState after: #traitsWindow valued:  
MorphDefaultState.

Then the problem is resolved; this is the kind of thing that inspired  
the creation of addDelegate:(before/after):valued:. Are you planning  
on sending in patches to morph.slate? If so, you can just fix that  
along with whatever else you're doing. Otherwise I'll go ahead and  
put in a fix for that (and another small fix for text.slate bitrot  
which I just noticed).

- --
- -Brian
http://tunes.org/~water/brice.vcf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDk27TPVkAvLW1zf4RApT/AKCaRzCFSrytPRvNZE11jPaETXmfTACfYrYl
XWMR1n8maMtcZim6vYjsGvA=
=Abj0
-----END PGP SIGNATURE-----




More information about the Slate mailing list