Morph>>changed should call super changed?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Morph>>changed should call super changed?

Simon Guest-2
Hi,

I've created a "dependent" morph which should be updated if one of
several others are changed.  So I called addDependent: on the morphs I
am observing, expecting to be called back with update: via
Object>>changed.

However, Morph>>changed overrides Object>>changed, and does not call
super, thus stopping this from working.

Have I missed something that would enable me to "observe" changes in
any other morph?

cheers,
Simon


Reply | Threaded
Open this post in threaded view
|

Is this a bug? [was Re: Morph>>changed should call super changed?]

Simon Guest-2
At Tue, 15 May 2007 22:11:35 +0100,
Simon Guest wrote:
> I've created a "dependent" morph which should be updated if one of
> several others are changed.  So I called addDependent: on the morphs I
> am observing, expecting to be called back with update: via
> Object>>changed.
>
> However, Morph>>changed overrides Object>>changed, and does not call
> super, thus stopping this from working.

As far as I can tell, this is a bug.  The fix is trivial, so I can
report it on Mantis, along with a little changeset with the fix.

But if I did this, would anything happen?  No-one seems bothered about
this issue ...

cheers,
Simon

PS: And I have a nagging suspicion that Someone Who Knows might look at
this and say, it's not a bug, that's how it's supposed to be, and this
is why ...


Reply | Threaded
Open this post in threaded view
|

Re: Is this a bug? [was Re: Morph>>changed should call super changed?]

Lex Spoon-3
Simon Guest <[hidden email]> writes:

> At Tue, 15 May 2007 22:11:35 +0100,
> Simon Guest wrote:
> > I've created a "dependent" morph which should be updated if one of
> > several others are changed.  So I called addDependent: on the morphs I
> > am observing, expecting to be called back with update: via
> > Object>>changed.
> >
> > However, Morph>>changed overrides Object>>changed, and does not call
> > super, thus stopping this from working.
>
> As far as I can tell, this is a bug.  The fix is trivial, so I can
> report it on Mantis, along with a little changeset with the fix.
>
> But if I did this, would anything happen?  No-one seems bothered about
> this issue ...


Maybe it should call super changed, I don't know.  In the meantime,
you can of course use #changed: with an argument, insead of #changed.


-Lex



Reply | Threaded
Open this post in threaded view
|

Re: Is this a bug? [was Re: Morph>>changed should call super changed?]

Simon Guest-2
At 22 May 2007 18:10:40 +0200,
Lex Spoon wrote:

>
> Simon Guest <[hidden email]> writes:
> > At Tue, 15 May 2007 22:11:35 +0100,
> > Simon Guest wrote:
> > > I've created a "dependent" morph which should be updated if one of
> > > several others are changed.  So I called addDependent: on the morphs I
> > > am observing, expecting to be called back with update: via
> > > Object>>changed.
> > >
> > > However, Morph>>changed overrides Object>>changed, and does not call
> > > super, thus stopping this from working.

> Maybe it should call super changed, I don't know.  In the meantime,
> you can of course use #changed: with an argument, insead of #changed.

Lex,

Thanks for the reply.  If I was making my own morph, I could indeed do
that.  But in my case I want to know when the handles of a
PolygonMorph are dragged around, which causes changed to be called,
but not changed:

I'll raise a bug report ...

cheers,
Simon