On 04.04.2011, at 20:12, Scott Wallace wrote:
On Apr 4, 2011, at 10:36 AM, Steve Thomas wrote:
Now how go I set my myPlayer variable to the BookMorph in its "owner chain" (if that's the common terminology)?
myPlayer := (myPlayer costume ownerThatIsA: BookMorph) topRendererOrSelf player.
... and with a bit of bullet-proofing:
script5 (myPlayer costume renderedMorph isKindOf: BookMorph) ifFalse: [(myPlayer costume ownerThatIsA: BookMorph) ifNotNilDo: [:book | myPlayer := book topRendererOrSelf assuredPlayer]]
- Bert -