OK, I know that a submorph can use its owner's methods by using:
(self ownerThatIsA: Morph) #method
But now I need a morph to access a submorph's methods, and I don't know how to do that. Can anyone please help?

Offline
(morph findA: Submorph) #method
This will find the first submorph of morph (in its submorphs list) that is of type Submorph, if it exists.
Be sure to test if the result of findA: isn't nil, otherwise you'll have an error.
Offline
Baderous wrote:
Code:
(morph findA: Submorph) #methodThis will find the first submorph of morph (in its submorphs list) that is of type Submorph, if it exists.
Be sure to test if the result of findA: isn't nil, otherwise you'll have an error.
Does that apply to ownerThatIsA: too? Because I've used that before without checking for nil and it worked fine...

Offline
Baderous wrote:
Read it in the method's comment:
ownerThatIsA: aClass
"Answer this the first morph in the owner chain of the given class, or nil if there isn't one."
Yeah, this is starting to give me an idea to fix one of my blocks...
I'll test the fix as soon as I can, and make the blocks I need this method for. Thanks once again, Baderous!

Offline