Media.show - How To Specify File And Origin Param At The Same Time?

I previously posted in a wrong category, so I’m posting again here…

Basically, I’ve been using media.show to let the user select a photo, then I’m saving the photo on my app folder.

It works perfectly on non-iPad devices with this code:

media.show( media.PhotoLibrary, onComplete, {baseDir=system.TemporaryDirectory, filename="screenshot.jpg", type="image"})

Now, when I run it on iPad the popover media selector shows up in the top left of the screen, so I need to add the parameters origin and permittedArrows to put the media selector near the button.

According to the api it should be like this:

media.show( media.PhotoLibrary, listener, file, origin, permittedArrowDirections ) 

But no matter what, when I add the file parameter, the origin/permittedArrow params stop working and the selector goes back in the top left position.

Also, if the syntax specified in the API is media.show (source, listener, file, origin, perm arrow), why is not following this syntax for the origin param on iPad? This is an example in the api to set the origin parameter:

media.show( media.PhotoLibrary, { listener = sessionComplete, origin = myButton.contentBounds } )

So, is it media.show(source, table of all the parameters?)
 

Is that a bug or am I doing something wrong? I’ve tried numerous time and can’t figure out how to specify file & origin parameter at the same time.

 

Thanks again for your help

Any help?
Please Coronalabs, I can’t release my new app without fixing this…

Any help?
Please Coronalabs, I can’t release my new app without fixing this…

Bumping this post.
Please, someone from Corona could check this? 

The API documentation for media.show is not very clear on how this works. The key is making the file table the last parameter when specifying the iPad popover parameters. I responded to your bug report and updated our API docs and added two examples for iPad.

http://docs.coronalabs.com/api/library/media/show.html

Bumping this post.
Please, someone from Corona could check this? 

The API documentation for media.show is not very clear on how this works. The key is making the file table the last parameter when specifying the iPad popover parameters. I responded to your bug report and updated our API docs and added two examples for iPad.

http://docs.coronalabs.com/api/library/media/show.html