How to find owner morph?

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

How to find owner morph?

Romit.Y
Hi,
I want to create a test project:
When I click my button, I wish destroy button's owner and then display another morph.Now I can't find button's owner morph when I design this press-down event, I can't send a hide or destroy message to button's owner morph.
Thanks
Regards
-
Yargboo


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How to find owner morph?

K. K. Subramaniam
On Wednesday 15 Jul 2009 6:19:28 pm 杨帅军 wrote:
> When I click my button, I wish destroy button's owner and then display
> another morph.Now I can't find button's owner morph when I design this
> press-down event, I can't send a hide or destroy message to button's owner
> morph
Have you tried saving the old owner?
     oldowner _ self owner.
     oldowner removeMorph: self.
     newowner addMorph: self.
     oldowner delete.
     newowner show.
HTH .. Subbu

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners