Composer Overlay Accessing Event.Parent

Dear Corona,

I am currently testing out the composer.overlay & trying to access its parent.

I don’t see any notes about the ‘event.parent’ in the docs. Only in the blog post here ( http://coronalabs.com/blog/2014/01/21/introducing-the-composer-api-plus-tutorial/ )

After doing some test, I notice that the event.parent is only accessible in these scenes :

create -> event.parent is nil

show -> event.parent is there (a table)

hide -> event.parent is there (a table)

destroy -> event.parent is nil

Hope this can be stated in the docs, so it helps someone else.

Thanks

There’s a little bit on event.parent on this page:

http://docs.coronalabs.com/guide/system/composer/index.html

Click “Accessing the Parent Scene” in the left-side list to get to it. Still not much there, though. :slight_smile:

Thanks for showing the results of your testing.

 Jay

Thanks for pointing it out in the guides.

I think accessing the parent-functions using ‘event.parent.yourFunction’ is better, as you can test whether it exist (pcall) or not.

There’s a little bit on event.parent on this page:

http://docs.coronalabs.com/guide/system/composer/index.html

Click “Accessing the Parent Scene” in the left-side list to get to it. Still not much there, though. :slight_smile:

Thanks for showing the results of your testing.

 Jay

Thanks for pointing it out in the guides.

I think accessing the parent-functions using ‘event.parent.yourFunction’ is better, as you can test whether it exist (pcall) or not.